perf: reuse cache info we already have when moving to object store

Signed-off-by: Robin Appelman <robin@icewind.nl>
pull/48222/head
Robin Appelman 2 years ago
parent 00a27afa26
commit 47d281865e
  1. 4
      lib/private/Files/ObjectStore/ObjectStoreStorage.php

@ -604,8 +604,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
}
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 {

Loading…
Cancel
Save