mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-04 02:39:08 -04:00
Skip empty files, since we know they're broken. Fixes ticket #610.
This commit is contained in:
@@ -150,7 +150,8 @@ class Server_Add_Controller extends Admin_Controller {
|
||||
$queue[] = array($child, $entry->id);
|
||||
} else {
|
||||
$ext = strtolower(pathinfo($child, PATHINFO_EXTENSION));
|
||||
if (in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4"))) {
|
||||
if (in_array($ext, array("gif", "jpeg", "jpg", "png", "flv", "mp4")) &&
|
||||
filesize($child) > 0) {
|
||||
$child_entry = ORM::factory("server_add_file");
|
||||
$child_entry->task_id = $task->id;
|
||||
$child_entry->file = $child;
|
||||
|
||||
Reference in New Issue
Block a user