aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/ObjectStore
diff options
context:
space:
mode:
authorJulius Härtl <jus@bitgrid.net>2023-06-14 14:38:33 +0200
committerJulius Härtl <jus@bitgrid.net>2023-09-06 07:25:28 +0200
commit88a96e4db7b2ef2768ee3b8a7f84df4fa183216d (patch)
tree060ac1bbe51c218675697abf20a2320203019cb9 /lib/private/Files/ObjectStore
parent00c0813ce6209e8910b60b48172743fc13bb1a15 (diff)
downloadnextcloud-server-88a96e4db7b2ef2768ee3b8a7f84df4fa183216d.tar.gz
nextcloud-server-88a96e4db7b2ef2768ee3b8a7f84df4fa183216d.zip
fix: Only store unencrypted_size if path should be encrypted
Signed-off-by: Julius Härtl <jus@bitgrid.net>
Diffstat (limited to 'lib/private/Files/ObjectStore')
-rw-r--r--lib/private/Files/ObjectStore/ObjectStoreStorage.php2
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/private/Files/ObjectStore/ObjectStoreStorage.php b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
index d918bd98729..4dceee9a58b 100644
--- a/lib/private/Files/ObjectStore/ObjectStoreStorage.php
+++ b/lib/private/Files/ObjectStore/ObjectStoreStorage.php
@@ -559,6 +559,8 @@ class ObjectStoreStorage extends \OC\Files\Storage\Common implements IChunkedFil
}
if ($exists) {
+ // Always update the unencrypted size, for encryption the Encryption wrapper will update this afterwards anyways
+ $stat['unencrypted_size'] = $stat['size'];
$this->getCache()->update($fileId, $stat);
} else {
if (!$this->validateWrites || $this->objectStore->objectExists($urn)) {