summaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath2002-10-19 02:18:51 +0000
committerGlenn L McGrath2002-10-19 02:18:51 +0000
commit25bca9566d66f13e17220135d45bb0fa94d4ed9d (patch)
treedde4b6999b3be2380cc9adc499797f50dc72e85a /archival/tar.c
parent98f824aa227e99891d9e65780197122772ca4dc2 (diff)
downloadbusybox-25bca9566d66f13e17220135d45bb0fa94d4ed9d.zip
busybox-25bca9566d66f13e17220135d45bb0fa94d4ed9d.tar.gz
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/tar.c')
-rw-r--r--archival/tar.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c
index 993478a..df110a1 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -717,6 +717,7 @@ int tar_main(int argc, char **argv)
#ifdef CONFIG_FEATURE_TAR_EXCLUDE
if (tar_handle->reject) {
+ printf("Reject list\n");
tar_handle->filter = filter_accept_reject_list;
} else
#endif /* CONFIG_FEATURE_TAR_EXCLUDE */
@@ -762,6 +763,11 @@ int tar_main(int argc, char **argv)
while (get_header_tar(tar_handle) == EXIT_SUCCESS);
}
+ /* Skip through list */
+ while (tar_handle->accept) {
+ error_msg_and_die("%s: Not found in archive\n", tar_handle->accept->data);
+ tar_handle->accept = tar_handle->accept->link;
+ }
#ifdef CONFIG_FEATURE_CLEAN_UP
if (tar_handle->src_fd != fileno(stdin)) {
close(tar_handle->src_fd);