[Pkg-owncloud-commits] [owncloud] 188/205: Perform the filesize only when the file exists
David Prévot
taffit at moszumanska.debian.org
Thu Jul 2 17:37:12 UTC 2015
This is an automated email from the git hooks/post-receive script.
taffit pushed a commit to branch stable8
in repository owncloud.
commit 9c533342fc805acec1d2291c7e5024b682eb9d46
Author: Joas Schilling <nickvergessen at owncloud.com>
Date: Tue Jun 30 10:21:03 2015 +0200
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(-)
diff --git a/lib/private/files/storage/wrapper/encryption.php b/lib/private/files/storage/wrapper/encryption.php
index ae04e3b..8818b82 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 {
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git
More information about the Pkg-owncloud-commits
mailing list