Skip to content

Commit 701662e

Browse files
artongebackportbot[bot]
authored andcommitted
fix(files_versions): Update unencrypted_size during rollback
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>
1 parent 305382a commit 701662e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

apps/files_versions/lib/Storage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,8 @@ public static function rollback(string $file, int $revision, IUser $user) {
408408
$fileInfo->getId(), [
409409
'encrypted' => $oldVersion,
410410
'encryptedVersion' => $oldVersion,
411-
'size' => $oldFileInfo->getSize()
411+
'size' => $oldFileInfo->getData()['size'],
412+
'unencrypted_size' => $oldFileInfo->getData()['unencrypted_size'],
412413
]
413414
);
414415

0 commit comments

Comments
 (0)