diff options
author | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-15 17:52:06 +0200 |
---|---|---|
committer | Bjoern Schiessle <schiessle@owncloud.com> | 2013-10-15 17:52:06 +0200 |
commit | 0811d2e30443de46f8e1202ec09c3c93fed87f2c (patch) | |
tree | 82320b5dfc41016329240a70aa79230ebe57d36a | |
parent | 58196304b8cafa2762f9662c188bc4eed2c11651 (diff) | |
download | nextcloud-server-0811d2e30443de46f8e1202ec09c3c93fed87f2c.tar.gz nextcloud-server-0811d2e30443de46f8e1202ec09c3c93fed87f2c.zip |
added another test, if unencrypted size and encrypted size are equal we can also assume that something is wrong
-rw-r--r-- | apps/files_encryption/lib/proxy.php | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/apps/files_encryption/lib/proxy.php b/apps/files_encryption/lib/proxy.php index 042becb32e3..1a950122119 100644 --- a/apps/files_encryption/lib/proxy.php +++ b/apps/files_encryption/lib/proxy.php @@ -348,7 +348,9 @@ class Proxy extends \OC_FileProxy { // if file is encrypted return real file size if (is_array($fileInfo) && $fileInfo['encrypted'] === true) { // 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); $fileInfo['unencrypted_size'] = $fixSize; // put file info if not .part file |