diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php index f2578e3c09..54596db3c4 100644 --- a/lib/private/connector/sabre/objecttree.php +++ b/lib/private/connector/sabre/objecttree.php @@ -135,10 +135,7 @@ class ObjectTree extends \Sabre\DAV\ObjectTree { throw new \Sabre\DAV\Exception\Forbidden(); } if ($sourceDir !== $destinationDir) { - if (!$this->fileView->isUpdatable($sourceDir)) { - throw new \Sabre\DAV\Exception\Forbidden(); - } - if (!$this->fileView->isUpdatable($destinationDir)) { + if (!$this->fileView->isCreatable($destinationDir)) { throw new \Sabre\DAV\Exception\Forbidden(); } if (!$this->fileView->isDeletable($sourcePath) && !$isMovableMount) { diff --git a/tests/lib/connector/sabre/objecttree.php b/tests/lib/connector/sabre/objecttree.php index a88e23bbe2..fc9f802066 100644 --- a/tests/lib/connector/sabre/objecttree.php +++ b/tests/lib/connector/sabre/objecttree.php @@ -25,6 +25,10 @@ class TestDoubleFileView extends \OC\Files\View{ return $this->updatables[$path]; } + public function isCreatable($path) { + return $this->updatables[$path]; + } + public function isDeletable($path) { return $this->deletables[$path]; }