aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/private/connector/sabre/objecttree.php5
-rw-r--r--tests/lib/connector/sabre/objecttree.php4
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/private/connector/sabre/objecttree.php b/lib/private/connector/sabre/objecttree.php
index f2578e3c097..54596db3c47 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 a88e23bbe2f..fc9f802066f 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];
}