Skip empty files, since we know they're broken. Fixes ticket #610.

This commit is contained in:
Bharat Mediratta
2009-08-04 20:35:13 -07:00
parent a03b9273b2
commit b9a6cd45ba

View File

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