diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-08-31 15:14:10 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-08-31 15:14:10 +0200 |
commit | f6a4d33ef76d6ca303d63ac4912a55d7620607cf (patch) | |
tree | 6060cac7259e7699a668df406faffdeb38bf1cea | |
parent | bc409d41c13b01df3c477975afbad8d6e08e8750 (diff) | |
download | nextcloud-server-f6a4d33ef76d6ca303d63ac4912a55d7620607cf.tar.gz nextcloud-server-f6a4d33ef76d6ca303d63ac4912a55d7620607cf.zip |
Check for file existence before doing a DAV copy
Partial backport of f39fcbc250c3817e0c62627b127cf31a70dca36a from 8.1
-rw-r--r-- | lib/private/connector/sabre/objecttree.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php index 11b0abf3bfc..09e0ea89318 100644 --- a/lib/private/connector/sabre/objecttree.php +++ b/lib/private/connector/sabre/objecttree.php @@ -203,6 +203,9 @@ class ObjectTree extends \Sabre\DAV\ObjectTree { throw new \Sabre\DAV\Exception\ServiceUnavailable('filesystem not setup'); } + // this will trigger existence check + $this->getNodeForPath($source); + try { if ($this->fileView->is_file($source)) { $this->fileView->copy($source, $destination); |