From 0811d2e30443de46f8e1202ec09c3c93fed87f2c Mon Sep 17 00:00:00 2001 From: Bjoern Schiessle Date: Tue, 15 Oct 2013 17:52:06 +0200 Subject: [PATCH] added another test, if unencrypted size and encrypted size are equal we can also assume that something is wrong --- apps/files_encryption/lib/proxy.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 -- 2.39.5