]> source.dussan.org Git - nextcloud-server.git/commitdiff
fix: ensure source folder is removed from cache when moving to objectstore
authorRobin Appelman <robin@icewind.nl>
Fri, 20 Sep 2024 09:19:14 +0000 (11:19 +0200)
committerLouis <louis@chmn.me>
Tue, 8 Oct 2024 16:14:26 +0000 (18:14 +0200)
otherwise this causes confusion down the line as it's contents will be moved to the new cache

Signed-off-by: Robin Appelman <robin@icewind.nl>
lib/private/Files/ObjectStore/ObjectStoreStorage.php

index c9fbe11bbfa475cf8633f0096a0fca7394eaa04a..7277c5b1e2060a7ecf1ed366251148804299ce42 100644 (file)
@@ -619,6 +619,7 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
                                $this->moveFromStorage($sourceStorage, $child->getPath(), $targetInternalPath . '/' . $child->getName());
                        }
                        $sourceStorage->rmdir($sourceInternalPath);
+                       $sourceStorage->getCache()->remove($sourceInternalPath);
                } else {
                        $sourceStream = $sourceStorage->fopen($sourceInternalPath, 'r');
                        if (!$sourceStream) {