summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
diff options
context:
space:
mode:
authorRobin Appelman <robin@icewind.nl>2017-07-03 14:58:34 +0200
committerRobin Appelman <robin@icewind.nl>2017-07-17 15:09:08 +0200
commit0e107bc63c52500e90a905766bb8760095a9288a (patch)
tree5fbc5bea88b333477469669935caa856ee7854f9 /lib/private/Files/View.php
parent125767265dc2720d94571199720d19945a03974d (diff)
downloadnextcloud-server-0e107bc63c52500e90a905766bb8760095a9288a.tar.gz
nextcloud-server-0e107bc63c52500e90a905766bb8760095a9288a.zip
non movable mounts can not be moved
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'lib/private/Files/View.php')
-rw-r--r--lib/private/Files/View.php20
1 files 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;
}