Skip to content

Commit 26dd12f

Browse files
benjaminfruehjuliusknorr
authored andcommitted
fix: Clear mount cache when file storage changes during move
Signed-off-by: Benjamin Frueh <benjamin.frueh@gmail.com>
1 parent e7d02a6 commit 26dd12f

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
@@ -791,6 +791,7 @@ public function moveFromCache(ICache $sourceCache, $sourcePath, $targetPath) {
791791
$this->connection->commit();
792792

793793
if ($sourceCache->getNumericStorageId() !== $this->getNumericStorageId()) {
794+
\OCP\Server::get(\OCP\Files\Config\IUserMountCache::class)->clear();
794795
$this->eventDispatcher->dispatchTyped(new CacheEntryRemovedEvent($this->storage, $sourcePath, $sourceId, $sourceCache->getNumericStorageId()));
795796
$event = new CacheEntryInsertedEvent($this->storage, $targetPath, $sourceId, $this->getNumericStorageId());
796797
$this->eventDispatcher->dispatch(CacheInsertEvent::class, $event);

0 commit comments

Comments
 (0)