mirror of
https://github.com/nextcloud/server.git
synced 2026-05-22 01:55:56 -04:00
fix: fix moving mountpoints
Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
parent
e7fcb6c7f5
commit
e5f77f004e
1 changed files with 8 additions and 5 deletions
|
|
@ -59,11 +59,14 @@ class Manager implements IMountManager {
|
|||
}
|
||||
|
||||
public function moveMount(string $mountPoint, string $target): void {
|
||||
$this->mounts[$target] = $this->mounts[$mountPoint];
|
||||
unset($this->mounts[$mountPoint]);
|
||||
$this->pathCache->clear();
|
||||
$this->inPathCache->clear();
|
||||
$this->areMountsSorted = false;
|
||||
if ($mountPoint !== $target) {
|
||||
$this->mounts[$target] = $this->mounts[$mountPoint];
|
||||
$this->mounts[$target]->setMountPoint($target);
|
||||
unset($this->mounts[$mountPoint]);
|
||||
$this->pathCache->clear();
|
||||
$this->inPathCache->clear();
|
||||
$this->areMountsSorted = false;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue