mirror of
https://github.com/nextcloud/server.git
synced 2026-05-28 04:32:30 -04:00
fix(S3): Use original folder size during copy
This prevent having copied folders with a wrongly set size of 0KB. - Fix https://github.com/nextcloud/server/issues/51916 Signed-off-by: Louis Chemineau <louis@chmn.me>
This commit is contained in:
parent
9530277f20
commit
1f8b823992
1 changed files with 4 additions and 0 deletions
|
|
@ -710,6 +710,10 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
|
|||
$cache->remove($to);
|
||||
}
|
||||
$this->mkdir($to);
|
||||
$cacheEntry = $cache->get(($to));
|
||||
$cache->update($cacheEntry->getId(), [
|
||||
'size' => $sourceEntry->getSize(),
|
||||
]);
|
||||
|
||||
foreach ($sourceCache->getFolderContentsById($sourceEntry->getId()) as $child) {
|
||||
$this->copyInner($sourceCache, $child, $to . '/' . $child->getName());
|
||||
|
|
|
|||
Loading…
Reference in a new issue