Perform the filesize only when the file exists

Regression from 95602d4069
and 9b336765b6
This commit is contained in:
Joas Schilling 2015-06-30 10:21:03 +02:00
parent a1bfc26b88
commit 9c533342fc

View file

@ -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 {