From: Robin Appelman Date: Fri, 20 Sep 2024 09:19:14 +0000 (+0200) Subject: fix: ensure source folder is removed from cache when moving to objectstore X-Git-Tag: v28.0.11~2^2~4 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5d36da37176e1aa915e7e63a1a4689d5bd3e6990;p=nextcloud-server.git fix: ensure source folder is removed from cache when moving to objectstore otherwise this causes confusion down the line as it's contents will be moved to the new cache Signed-off-by: Robin Appelman --- diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index c9fbe11bbfa..7277c5b1e20 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -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) {