]> source.dussan.org Git - nextcloud-server.git/commitdiff
Update the unencrypted file size when closing streams
authorJulius Härtl <jus@bitgrid.net>
Wed, 7 Dec 2022 15:26:31 +0000 (16:26 +0100)
committerJulius Härtl <jus@bitgrid.net>
Wed, 7 Dec 2022 15:26:31 +0000 (16:26 +0100)
Signed-off-by: Julius Härtl <jus@bitgrid.net>
lib/private/Files/Stream/Encryption.php

index 0f1838c97c82e74e57ad4e40675c27f7958a44f9..bc4d071627001f3c23f7851b14e77f79cf1817e3 100644 (file)
@@ -465,7 +465,7 @@ class Encryption extends Wrapper {
                        $cacheEntry = $cache->get($this->internalPath);
                        if ($cacheEntry) {
                                $version = $cacheEntry['encryptedVersion'] + 1;
-                               $cache->update($cacheEntry->getId(), ['encrypted' => $version, 'encryptedVersion' => $version]);
+                               $cache->update($cacheEntry->getId(), ['encrypted' => $version, 'encryptedVersion' => $version, 'unencrypted_size' => $this->unencryptedSize]);
                        }
                }