summaryrefslogtreecommitdiffhomepage
path: root/archival/libunarchive
diff options
context:
space:
mode:
authorGlenn L McGrath <bug1@ihug.co.nz>2002-10-19 02:18:51 +0000
committerGlenn L McGrath <bug1@ihug.co.nz>2002-10-19 02:18:51 +0000
commit25bca9566d66f13e17220135d45bb0fa94d4ed9d (patch)
treedde4b6999b3be2380cc9adc499797f50dc72e85a /archival/libunarchive
parent98f824aa227e99891d9e65780197122772ca4dc2 (diff)
Remove entries from the accept list as they are matched so we can determine if any files that were specified in the list wernt found.
Diffstat (limited to 'archival/libunarchive')
-rw-r--r--archival/libunarchive/filter_accept_list.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/archival/libunarchive/filter_accept_list.c b/archival/libunarchive/filter_accept_list.c
index 06b1dd3dd..9f92e6440 100644
--- a/archival/libunarchive/filter_accept_list.c
+++ b/archival/libunarchive/filter_accept_list.c
@@ -6,10 +6,18 @@
*/
extern char filter_accept_list(const llist_t *accept_list, const llist_t *reject_list, const char *key)
{
+ llist_t *accept_old;
+
while (accept_list) {
if (fnmatch(accept_list->data, key, 0) == 0) {
+ /* Remove entry from list */
+ accept_old->link = accept_list->link;
+ free(accept_list->data);
+ free(accept_list);
+ accept_list = accept_old;
return(EXIT_SUCCESS);
}
+ accept_old = accept_list;
accept_list = accept_list->link;
}
return(EXIT_FAILURE);