diff options
author | Glenn L McGrath <bug1@ihug.co.nz> | 2002-10-19 02:18:51 +0000 |
---|---|---|
committer | Glenn L McGrath <bug1@ihug.co.nz> | 2002-10-19 02:18:51 +0000 |
commit | 25bca9566d66f13e17220135d45bb0fa94d4ed9d (patch) | |
tree | dde4b6999b3be2380cc9adc499797f50dc72e85a /archival/tar.c | |
parent | 98f824aa227e99891d9e65780197122772ca4dc2 (diff) | |
download | busybox-w32-25bca9566d66f13e17220135d45bb0fa94d4ed9d.tar.gz busybox-w32-25bca9566d66f13e17220135d45bb0fa94d4ed9d.tar.bz2 busybox-w32-25bca9566d66f13e17220135d45bb0fa94d4ed9d.zip |
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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c index 993478a67..df110a149 100644 --- a/archival/tar.c +++ b/archival/tar.c | |||
@@ -717,6 +717,7 @@ int tar_main(int argc, char **argv) | |||
717 | 717 | ||
718 | #ifdef CONFIG_FEATURE_TAR_EXCLUDE | 718 | #ifdef CONFIG_FEATURE_TAR_EXCLUDE |
719 | if (tar_handle->reject) { | 719 | if (tar_handle->reject) { |
720 | printf("Reject list\n"); | ||
720 | tar_handle->filter = filter_accept_reject_list; | 721 | tar_handle->filter = filter_accept_reject_list; |
721 | } else | 722 | } else |
722 | #endif /* CONFIG_FEATURE_TAR_EXCLUDE */ | 723 | #endif /* CONFIG_FEATURE_TAR_EXCLUDE */ |
@@ -762,6 +763,11 @@ int tar_main(int argc, char **argv) | |||
762 | while (get_header_tar(tar_handle) == EXIT_SUCCESS); | 763 | while (get_header_tar(tar_handle) == EXIT_SUCCESS); |
763 | } | 764 | } |
764 | 765 | ||
766 | /* Skip through list */ | ||
767 | while (tar_handle->accept) { | ||
768 | error_msg_and_die("%s: Not found in archive\n", tar_handle->accept->data); | ||
769 | tar_handle->accept = tar_handle->accept->link; | ||
770 | } | ||
765 | #ifdef CONFIG_FEATURE_CLEAN_UP | 771 | #ifdef CONFIG_FEATURE_CLEAN_UP |
766 | if (tar_handle->src_fd != fileno(stdin)) { | 772 | if (tar_handle->src_fd != fileno(stdin)) { |
767 | close(tar_handle->src_fd); | 773 | close(tar_handle->src_fd); |