diff options
Diffstat (limited to 'lib/private/Files')
-rw-r--r-- | lib/private/Files/View.php | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/private/Files/View.php b/lib/private/Files/View.php index 03bafd2e635..072d3520ae9 100644 --- a/lib/private/Files/View.php +++ b/lib/private/Files/View.php @@ -700,11 +700,14 @@ class View { * * @param string $source source path * @param string $target target path + * @param array $options * * @return bool|mixed * @throws LockedException */ - public function rename($source, $target) { + public function rename($source, $target, array $options = []) { + $checkSubMounts = $options['checkSubMounts'] ?? true; + $absolutePath1 = Filesystem::normalizePath($this->getAbsolutePath($source)); $absolutePath2 = Filesystem::normalizePath($this->getAbsolutePath($target)); @@ -772,13 +775,16 @@ class View { try { $this->changeLock($target, ILockingProvider::LOCK_EXCLUSIVE, true); - $movedMounts = $mountManager->findIn($this->getAbsolutePath($source)); + if ($checkSubMounts) { + $movedMounts = $mountManager->findIn($this->getAbsolutePath($source)); + } else { + $movedMounts = []; + } if ($internalPath1 === '') { $sourceParentMount = $this->getMount(dirname($source)); $movedMounts[] = $mount1; $this->validateMountMove($movedMounts, $sourceParentMount, $mount2, !$this->targetIsNotShared($targetUser, $absolutePath2)); - /** * @var \OC\Files\Mount\MountPoint | \OC\Files\Mount\MoveableMount $mount1 */ |