summaryrefslogtreecommitdiffstats
path: root/lib/private/Files/View.php
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2017-07-21 23:10:50 +0200
committerGitHub <noreply@github.com>2017-07-21 23:10:50 +0200
commit655c26224be56ef284f9032cfe70ad026d5c62b1 (patch)
tree71007e4a512cbd7ad396f885512b46b46eef2695 /lib/private/Files/View.php
parent50fc5a1e2524724549ac2cbeefe64a4692dbda77 (diff)
parent359a583186c9e992b95b79966365f43305ccc4d2 (diff)
downloadnextcloud-server-655c26224be56ef284f9032cfe70ad026d5c62b1.tar.gz
nextcloud-server-655c26224be56ef284f9032cfe70ad026d5c62b1.zip
Merge pull request #5596 from nextcloud/mount-rename
Fix renaming of non-renamble mounts
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 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;
}