Skip to content

Commit

Permalink
perf: reuse cache info we already have when moving to object store
Browse files Browse the repository at this point in the history
Signed-off-by: Robin Appelman <robin@icewind.nl>
  • Loading branch information
icewind1991 committed Sep 19, 2024
1 parent 00a27af commit 47d2818
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/private/Files/ObjectStore/ObjectStoreStorage.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down

0 comments on commit 47d2818

Please sign in to comment.