Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorVincent Petry <pvince81@owncloud.com>2015-08-31 16:14:10 +0300
committerVincent Petry <pvince81@owncloud.com>2015-08-31 16:14:10 +0300
commitf6a4d33ef76d6ca303d63ac4912a55d7620607cf (patch)
tree6060cac7259e7699a668df406faffdeb38bf1cea /lib
parentbc409d41c13b01df3c477975afbad8d6e08e8750 (diff)
Check for file existence before doing a DAV copy
Partial backport of f39fcbc250c3817e0c62627b127cf31a70dca36a from 8.1
Diffstat (limited to 'lib')
-rw-r--r--lib/private/connector/sabre/objecttree.php3
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);