Skip to content
Snippets Groups Projects
Commit 0811d2e3 authored by Björn Schießle's avatar Björn Schießle
Browse files

added another test, if unencrypted size and encrypted size are equal we can...

added another test, if unencrypted size and encrypted size are equal we can also assume that something is wrong
parent 58196304
No related branches found
No related tags found
No related merge requests found
...@@ -348,7 +348,9 @@ class Proxy extends \OC_FileProxy { ...@@ -348,7 +348,9 @@ class Proxy extends \OC_FileProxy {
// if file is encrypted return real file size // if file is encrypted return real file size
if (is_array($fileInfo) && $fileInfo['encrypted'] === true) { if (is_array($fileInfo) && $fileInfo['encrypted'] === true) {
// try to fix unencrypted file size if it doesn't look plausible // try to fix unencrypted file size if it doesn't look plausible
if ((int)$fileInfo['size'] > 0 && (int)$fileInfo['unencrypted_size'] === 0) { if ((int)$fileInfo['size'] > 0 &&
((int)$fileInfo['unencrypted_size'] === 0 ||
(int)$fileInfo['size'] === (int)$fileInfo['unencrypted_size'])) {
$fixSize = $util->getFileSize($path); $fixSize = $util->getFileSize($path);
$fileInfo['unencrypted_size'] = $fixSize; $fileInfo['unencrypted_size'] = $fixSize;
// put file info if not .part file // put file info if not .part file
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment