From d7620e3970e6fbe65487fc565ce65a2f2d7702f6 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 3 Jul 2017 14:58:34 +0200 Subject: [PATCH 1/2] non movable mounts can not be moved Signed-off-by: Robin Appelman --- lib/private/Files/View.php | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 0e22415e6f7..bc16511bdab 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -779,14 +779,18 @@ class View { $this->changeLock($path1, ILockingProvider::LOCK_EXCLUSIVE, true); $this->changeLock($path2, ILockingProvider::LOCK_EXCLUSIVE, true); - if ($internalPath1 === '' and $mount1 instanceof MoveableMount) { - if ($this->isTargetAllowed($absolutePath2)) { - /** - * @var \OC\Files\Mount\MountPoint | \OC\Files\Mount\MoveableMount $mount1 - */ - $sourceMountPoint = $mount1->getMountPoint(); - $result = $mount1->moveMount($absolutePath2); - $manager->moveMount($sourceMountPoint, $mount1->getMountPoint()); + if ($internalPath1 === '') { + if ($mount1 instanceof MoveableMount) { + if ($this->isTargetAllowed($absolutePath2)) { + /** + * @var \OC\Files\Mount\MountPoint | \OC\Files\Mount\MoveableMount $mount1 + */ + $sourceMountPoint = $mount1->getMountPoint(); + $result = $mount1->moveMount($absolutePath2); + $manager->moveMount($sourceMountPoint, $mount1->getMountPoint()); + } else { + $result = false; + } } else { $result = false; } From 8bfa3922a324a0d4ad1d4754e48152de1caec9b4 Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 3 Jul 2017 15:37:26 +0200 Subject: [PATCH 2/2] fix parsing of dav permissions Signed-off-by: Robin Appelman --- core/js/files/client.js | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/core/js/files/client.js b/core/js/files/client.js index da8a1205e4b..47a22fbbf7c 100644 --- a/core/js/files/client.js +++ b/core/js/files/client.js @@ -338,11 +338,10 @@ case 'C': case 'K': data.permissions |= OC.PERMISSION_CREATE; - if (!isFile) { - data.permissions |= OC.PERMISSION_UPDATE; - } break; case 'W': + case 'N': + case 'V': data.permissions |= OC.PERMISSION_UPDATE; break; case 'D':