Merge pull request #4481 from owncloud/fix_versioning_size_check

first check if file exists before checking the files size
This commit is contained in:
Björn Schießle 2013-08-17 04:37:09 -07:00
commit 1af2ec1724
1 changed files with 9 additions and 10 deletions

View File

@ -104,8 +104,7 @@ class Storage {
// we should have a source file to work with, and the file shouldn't
// be empty
$fileExists = $files_view->file_exists($filename);
$fileSize = $files_view->filesize($filename);
if ($fileExists === false || $fileSize === 0) {
if (!($fileExists && $files_view->filesize($filename) > 0)) {
return false;
}