mirror of
https://github.com/nextcloud/server.git
synced 2026-07-16 13:23:11 -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
fc9176b567
commit
1c80a98720
1 changed files with 4 additions and 0 deletions
|
|
@ -713,6 +713,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