Skip to content

Commit 563fa56

Browse files
benjaminfruehbackportbot[bot]
authored andcommitted
fix: Clear mount cache when file storage changes during move
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
1 parent aec7253 commit 563fa56

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

lib/private/Files/Cache/Cache.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -775,6 +775,7 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
775775
$this->connection->commit();
776776

777777
if ($sourceCache->getNumericStorageId() !== $this->getNumericStorageId()) {
778+
\OCP\Server::get(\OCP\Files\Config\IUserMountCache::class)->clear();
778779
$this->eventDispatcher->dispatchTyped(new CacheEntryRemovedEvent($this->storage, $sourcePath, $sourceId, $sourceCache->getNumericStorageId()));
779780
$event = new CacheEntryInsertedEvent($this->storage, $targetPath, $sourceId, $this->getNumericStorageId());
780781
$this->eventDispatcher->dispatch(CacheInsertEvent::class, $event);

0 commit comments

Comments
 (0)