diff options
author | Louis Chemineau <louis@chmn.me> | 2025-05-16 16:20:29 +0200 |
---|---|---|
committer | Louis <louis@chmn.me> | 2025-05-28 15:52:00 +0200 |
commit | 1f8b82399292ea59882b22fc924c9bba477444e6 (patch) | |
tree | f330706e8a7b6d7731592029c03b503ee6aa7b4a /lib/private/Files/ObjectStore | |
parent | 9530277f208694e2dffe03a3f758a15c062a0195 (diff) | |
download | nextcloud-server-1f8b82399292ea59882b22fc924c9bba477444e6.tar.gz nextcloud-server-1f8b82399292ea59882b22fc924c9bba477444e6.zip |
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>
Diffstat (limited to 'lib/private/Files/ObjectStore')
-rw-r--r-- | lib/private/Files/ObjectStore/ObjectStoreStorage.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php index ebe87399ab4..02724e2e20a 100644 --- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php +++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php @@ -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()); |