diff options
Diffstat (limited to 'apps/files_versions/lib')
-rw-r--r-- | apps/files_versions/lib/versions.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/files_versions/lib/versions.php b/apps/files_versions/lib/versions.php index 7c75d70f79c..70b8f30be5c 100644 --- a/apps/files_versions/lib/versions.php +++ b/apps/files_versions/lib/versions.php @@ -101,8 +101,11 @@ class Storage { return false; } - // we should have a source file to work with - if (!$files_view->file_exists($filename)) { + // 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) { return false; } |