From f6a4d33ef76d6ca303d63ac4912a55d7620607cf Mon Sep 17 00:00:00 2001 From: Vincent Petry Date: Mon, 31 Aug 2015 15:14:10 +0200 Subject: Check for file existence before doing a DAV copy Partial backport of f39fcbc250c3817e0c62627b127cf31a70dca36a from 8.1 --- lib/private/connector/sabre/objecttree.php | 3 +++ 1 file changed, 3 insertions(+) (limited to 'lib') 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); -- cgit v1.2.3