Skip to content

Commit 30b7dfb

Browse files
committed
perf: reuse cache info we already have when moving to object store
Signed-off-by: Robin Appelman <[email protected]>
1 parent 00a27af commit 30b7dfb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

lib/private/Files/ObjectStore/ObjectStoreStorage.php

Lines changed: 3 additions & 3 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 {
@@ -703,7 +703,7 @@ public function putChunkedWritePart(
703703
string $writeToken,
704704
string $chunkId,
705705
$data,
706-
$size = null,
706+
$size = null
707707
): ?array {
708708
if (!$this->objectStore instanceof IObjectStoreMultiPartUpload) {
709709
throw new GenericFileException('Object store does not support multipart upload');

0 commit comments

Comments
 (0)