Skip to content

Commit cd666cb

Browse files
icewind1991artonge
authored andcommitted
fix: fix moving mountpoints
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent cf7c41e commit cd666cb

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

lib/private/Files/Mount/Manager.php

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,14 @@ public function removeMount(string $mountPoint): void {
5959
}
6060

6161
public function moveMount(string $mountPoint, string $target): void {
62-
if (isset($this->mounts[$mountPoint])) {
62+
if ($mountPoint !== $target && isset($this->mounts[$mountPoint])) {
6363
$this->mounts[$target] = $this->mounts[$mountPoint];
64+
$this->mounts[$target]->setMountPoint($target);
6465
unset($this->mounts[$mountPoint]);
66+
$this->pathCache->clear();
67+
$this->inPathCache->clear();
68+
$this->areMountsSorted = false;
6569
}
66-
$this->pathCache->clear();
67-
$this->inPathCache->clear();
68-
$this->areMountsSorted = false;
6970
}
7071

7172
/**

0 commit comments

Comments
 (0)