Skip to content

Commit 47d2818

Browse files
committed
perf: reuse cache info we already have when moving to object store
Signed-off-by: Robin Appelman <robin@icewind.nl>
1 parent 00a27af commit 47d2818

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/private/Files/ObjectStore/ObjectStoreStorage.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -604,8 +604,8 @@ public function moveFromStorage(IStorage $sourceStorage, $sourceInternalPath, $t
604604
}
605605
if ($sourceCacheEntry->getMimeType() === FileInfo::MIMETYPE_FOLDER) {
606606
$this->mkdir($targetInternalPath);
607-
foreach ($sourceCache->getFolderContents($sourceInternalPath) as $child) {
608-
$this->moveFromStorage($sourceStorage, $child->getPath(), $targetInternalPath . '/' . $child->getName());
607+
foreach ($sourceCache->getFolderContentsById($sourceCacheEntry->getId()) as $child) {
608+
$this->moveFromStorage($sourceStorage, $child->getPath(), $targetInternalPath . '/' . $child->getName(), $child);
609609
}
610610
$sourceStorage->rmdir($sourceInternalPath);
611611
} else {

0 commit comments

Comments
 (0)