fix: Clear mount cache when file storage changes during move

Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
pull/56418/head
Benjamin Frueh 2025-11-13 14:59:08 +07:00 committed by backportbot[bot]
parent aec7253ddd
commit 563fa568d3
1 changed files with 1 additions and 0 deletions

@ -775,6 +775,7 @@ class Cache implements ICache {
$this->connection->commit();
if ($sourceCache->getNumericStorageId() !== $this->getNumericStorageId()) {
\OCP\Server::get(\OCP\Files\Config\IUserMountCache::class)->clear();
$this->eventDispatcher->dispatchTyped(new CacheEntryRemovedEvent($this->storage, $sourcePath, $sourceId, $sourceCache->getNumericStorageId()));
$event = new CacheEntryInsertedEvent($this->storage, $targetPath, $sourceId, $this->getNumericStorageId());
$this->eventDispatcher->dispatch(CacheInsertEvent::class, $event);