Update the unencrypted file size when closing streams

Signed-off-by: Julius Härtl <jus@bitgrid.net>
This commit is contained in:
Julius Härtl 2022-12-07 16:26:31 +01:00 committed by backportbot-nextcloud[bot]
parent f2f6d52263
commit da45a807ac

View 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]);
}
}