Merge pull request #56416 from nextcloud/fix/clear-mount-cache-on-storage-change

fix: Clear mount cache when file storage changes during move
pull/56559/head
Joas Schilling 2025-11-24 14:03:41 +07:00 committed by GitHub
commit 00e1264ade
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 0 deletions

@ -791,6 +791,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);