don't create empty versions

This commit is contained in:
Bjoern Schiessle 2013-07-30 16:01:27 +02:00
parent 10939b0bdf
commit 853b106bb2
1 changed files with 5 additions and 2 deletions

View File

@ -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;
}