summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--core/js/files/client.js5
-rw-r--r--lib/private/Files/View.php20
2 files changed, 14 insertions, 11 deletions
diff --git a/core/js/files/client.js b/core/js/files/client.js
index d8e615f6d6d..176cabf04b1 100644
--- a/core/js/files/client.js
+++ b/core/js/files/client.js
@@ -331,11 +331,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':
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php
index c384d07c037..71b453d299a 100644
--- a/lib/private/Files/View.php
+++ b/lib/private/Files/View.php
@@ -770,14 +770,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;
}