diff options
author | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-30 10:21:03 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@owncloud.com> | 2015-06-30 11:47:58 +0200 |
commit | 9c533342fc805acec1d2291c7e5024b682eb9d46 (patch) | |
tree | acf08ce5529b3e264aa26e839f8e18eb93a8972f /lib | |
parent | a1bfc26b883e458389712af8624a0d76e83a536a (diff) | |
download | nextcloud-server-9c533342fc805acec1d2291c7e5024b682eb9d46.tar.gz nextcloud-server-9c533342fc805acec1d2291c7e5024b682eb9d46.zip |
Perform the filesize only when the file exists
Regression from 95602d4069a1eb9a45e1d08edeecc0d5b90e01ca
and 9b336765b69bf7b7e2cd67a824862411b249aa4d
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/files/storage/wrapper/encryption.php | 8 |
1 files changed, 6 insertions, 2 deletions
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 { |