From 9c533342fc805acec1d2291c7e5024b682eb9d46 Mon Sep 17 00:00:00 2001 From: Joas Schilling Date: Tue, 30 Jun 2015 10:21:03 +0200 Subject: Perform the filesize only when the file exists Regression from 95602d4069a1eb9a45e1d08edeecc0d5b90e01ca and 9b336765b69bf7b7e2cd67a824862411b249aa4d --- lib/private/files/storage/wrapper/encryption.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'lib') diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php index ae04e3bec4d..8818b822fa7 100644 --- a/lib/private/files/storage/wrapper/encryption.php +++ b/lib/private/files/storage/wrapper/encryption.php @@ -364,8 +364,12 @@ class Encryption extends Wrapper { $encryptionModule = $this->encryptionManager->getEncryptionModule($encryptionModuleId); } - $size = $this->storage->filesize($path); - $unencryptedSize = $this->filesize($path); + if ($this->file_exists($path)) { + $size = $this->storage->filesize($path); + $unencryptedSize = $this->filesize($path); + } else { + $size = $unencryptedSize = 0; + } } try { -- cgit v1.2.3