aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/Files/Storage/Wrapper
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/Storage/Wrapper
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/Storage/Wrapper')
-rw-r--r--lib/private/Files/Storage/Wrapper/Encryption.php2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/private/Files/Storage/Wrapper/Encryption.php b/lib/private/Files/Storage/Wrapper/Encryption.php
index d559454fcb7..7ce4338256f 100644
--- a/lib/private/Files/Storage/Wrapper/Encryption.php
+++ b/lib/private/Files/Storage/Wrapper/Encryption.php
@@ -1071,7 +1071,7 @@ class Encryption extends Wrapper {
// object store, stores the size after write and doesn't update this during scan
// manually store the unencrypted size
- if ($result && $this->getWrapperStorage()->instanceOfStorage(ObjectStoreStorage::class)) {
+ if ($result && $this->getWrapperStorage()->instanceOfStorage(ObjectStoreStorage::class) && $this->shouldEncrypt($path)) {
$this->getCache()->put($path, ['unencrypted_size' => $count]);
}