diff options
author | Vincent Petry <pvince81@owncloud.com> | 2015-06-30 14:51:29 +0200 |
---|---|---|
committer | Vincent Petry <pvince81@owncloud.com> | 2015-06-30 14:51:29 +0200 |
commit | 0118bf04dc792ec3025719482b23be8d215ed467 (patch) | |
tree | c16f9c233ffa4aa9d96348cc938c2338cf3e3b9b /lib/private/files | |
parent | 2bcd0af177a8aa7a5af72d90a7c3c5d0f58d2c94 (diff) | |
parent | 9c533342fc805acec1d2291c7e5024b682eb9d46 (diff) | |
download | nextcloud-server-0118bf04dc792ec3025719482b23be8d215ed467.tar.gz nextcloud-server-0118bf04dc792ec3025719482b23be8d215ed467.zip |
Merge pull request #17251 from owncloud/issue-17247-filesize-stat-failed-for-in-log
Perform the filesize on the file that exists
Diffstat (limited to 'lib/private/files')
-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 { |