Skip to content

Commit c87db7a

Browse files
committed
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 <[email protected]>
1 parent 5336c92 commit c87db7a

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
@@ -378,7 +378,8 @@ public static function rollback(string $file, int $revision, IUser $user) {
378378
$fileInfo->getId(), [
379379
'encrypted' => $oldVersion,
380380
'encryptedVersion' => $oldVersion,
381-
'size' => $oldFileInfo->getSize()
381+
'size' => $oldFileInfo->getData()['size'],
382+
'unencrypted_size' => $oldFileInfo->getData()['unencrypted_size'],
382383
]
383384
);
384385

0 commit comments

Comments
 (0)