fix: fix moving mountpoints

Signed-off-by: Robin Appelman <robin@icewind.nl>
This commit is contained in:
Robin Appelman 2026-03-16 23:07:03 +01:00
parent e7fcb6c7f5
commit e5f77f004e
No known key found for this signature in database
GPG key ID: 42B69D8A64526EFB

View file

@ -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;
}
}
/**