ar: fix a regression: "ar t arch.a" stopped shoting files
authorNguyễn Thái Ngọc Duy <pclouds@gmail.com>
Thu, 15 Apr 2010 23:55:04 +0000 (16:55 -0700)
committerDenys Vlasenko <vda.linux@googlemail.com>
Thu, 15 Apr 2010 23:55:04 +0000 (16:55 -0700)
Signed-off-by: Nguyễn Thái Ngọc Duy <pclouds@gmail.com>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
archival/ar.c

index 90397474d19294eb7385327ca6f6509fae92a288..1b7b66a5795d28051e9be40f5a8246d807e468f7 100644 (file)
@@ -235,7 +235,8 @@ int ar_main(int argc UNUSED_PARAM, char **argv)
                                : O_RDONLY
        );
 
-       archive_handle->filter = filter_accept_list;
+       if (*argv)
+               archive_handle->filter = filter_accept_list;
        while (*argv) {
                llist_add_to_end(&archive_handle->accept, *argv++);
        }