From 47d281865ebd2527446ccff9435be2d09e28f59f Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Thu, 19 Sep 2024 19:01:23 +0200 Subject: [PATCH] perf: reuse cache info we already have when moving to object store Signed-off-by: Robin Appelman --- lib/private/Files/ObjectStore/ObjectStoreStorage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index 26823f65c2f0e..2f1f91f7f221d 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -604,8 +604,8 @@ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $t } if ($sourceCacheEntry->getMimeType() === FileInfo::MIMETYPE_FOLDER) { $this->mkdir($targetInternalPath); - foreach ($sourceCache->getFolderContents($sourceInternalPath) as $child) { - $this->moveFromStorage($sourceStorage, $child->getPath(), $targetInternalPath . '/' . $child->getName()); + foreach ($sourceCache->getFolderContentsById($sourceCacheEntry->getId()) as $child) { + $this->moveFromStorage($sourceStorage, $child->getPath(), $targetInternalPath . '/' . $child->getName(), $child); } $sourceStorage->rmdir($sourceInternalPath); } else {