Commit 6ad7be95 authored by Viliam Mateicka's avatar Viliam Mateicka Committed by Max Kellermann

update: fixing empty filenames in archives

parent c15ac572
......@@ -56,8 +56,11 @@ zip_open(char * pathname)
}
while (zzip_dir_read(context->dir, &dirent)) {
//add only files
if (dirent.st_size > 0) {
context->list = g_slist_prepend( context->list, xstrdup(dirent.d_name));
}
}
return (struct archive_file *)context;
}
......
......@@ -296,6 +296,10 @@ update_archive_tree(struct directory *directory, char *name)
//create directories first
update_archive_tree(subdir, tmp+1);
} else {
if (strlen(name) == 0) {
g_warning("archive returned directory only\n");
return;
}
//add file
song = songvec_find(&directory->songs, name);
if (song == NULL) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment