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:
commit
1af2ec1724
|
@ -104,8 +104,7 @@ class Storage {
|
||||||
// we should have a source file to work with, and the file shouldn't
|
// we should have a source file to work with, and the file shouldn't
|
||||||
// be empty
|
// be empty
|
||||||
$fileExists = $files_view->file_exists($filename);
|
$fileExists = $files_view->file_exists($filename);
|
||||||
$fileSize = $files_view->filesize($filename);
|
if (!($fileExists && $files_view->filesize($filename) > 0)) {
|
||||||
if ($fileExists === false || $fileSize === 0) {
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue