aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Chemineau <louis@chmn.me>2025-01-21 18:27:38 +0100
committerbackportbot[bot] <backportbot[bot]@users.noreply.github.com>2025-01-29 09:36:39 +0000
commitf5df2545214fefb7a95c95a14cc9ec0607393a83 (patch)
treece43e90561ea8d40a47bc1a340b6c1faf6b20714
parent097ce6ef98bccee23e4e1da39a27d722789ad93e (diff)
downloadnextcloud-server-backport/50299/stable31.tar.gz
nextcloud-server-backport/50299/stable31.zip
fix(files_versions): Update `unencrypted_size` during rollbackbackport/50299/stable31
This prevent restored version of encrypted files from having a wrong reported size. This was blocking download. Signed-off-by: Louis Chemineau <louis@chmn.me>
-rw-r--r--apps/files_versions/lib/Storage.php3
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/files_versions/lib/Storage.php b/apps/files_versions/lib/Storage.php
index ad02020a901..11e6bff6b6b 100644
--- a/apps/files_versions/lib/Storage.php
+++ b/apps/files_versions/lib/Storage.php
@@ -378,7 +378,8 @@ class Storage {
$fileInfo->getId(), [
'encrypted' => $oldVersion,
'encryptedVersion' => $oldVersion,
- 'size' => $oldFileInfo->getSize()
+ 'size' => $oldFileInfo->getData()['size'],
+ 'unencrypted_size' => $oldFileInfo->getData()['unencrypted_size'],
]
);