Skip to content

Commit 3575c0e

Browse files
authored
Merge pull request #56418 from nextcloud/backport/56416/stable31
[stable31] fix: Clear mount cache when file storage changes during move
2 parents 789045a + 563fa56 commit 3575c0e

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)