aboutsummaryrefslogtreecommitdiffstats
path: root/src/archive/zip_plugin.c
diff options
context:
space:
mode:
authorViliam Mateicka <viliam.mateicka@gmail.com>2008-12-28 19:03:00 +0100
committerMax Kellermann <max@duempel.org>2008-12-29 07:26:17 +0100
commit6ad7be95253597f371b1ac8b979f75cee3c7a8b3 (patch)
tree3409ae65ecea96e61599069d491b4d067d5f0f80 /src/archive/zip_plugin.c
parentc15ac572711cf912ff67a45e655cd83ce9ed3a1e (diff)
downloadmpd-6ad7be95253597f371b1ac8b979f75cee3c7a8b3.tar.gz
mpd-6ad7be95253597f371b1ac8b979f75cee3c7a8b3.tar.xz
mpd-6ad7be95253597f371b1ac8b979f75cee3c7a8b3.zip
update: fixing empty filenames in archives
Diffstat (limited to 'src/archive/zip_plugin.c')
-rw-r--r--src/archive/zip_plugin.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/archive/zip_plugin.c b/src/archive/zip_plugin.c
index 6ef53a625..76eec229d 100644
--- a/src/archive/zip_plugin.c
+++ b/src/archive/zip_plugin.c
@@ -56,7 +56,10 @@ zip_open(char * pathname)
}
while (zzip_dir_read(context->dir, &dirent)) {
- context->list = g_slist_prepend( context->list, xstrdup(dirent.d_name));
+ //add only files
+ if (dirent.st_size > 0) {
+ context->list = g_slist_prepend( context->list, xstrdup(dirent.d_name));
+ }
}
return (struct archive_file *)context;