summaryrefslogtreecommitdiff
path: root/archival/tar.c
diff options
context:
space:
mode:
authorGlenn L McGrath2003-11-20 10:47:06 +0000
committerGlenn L McGrath2003-11-20 10:47:06 +0000
commite857122c97b934a00252889a978db69d4e774df7 (patch)
tree896833c6053b6159ea1d83f4eac19145a0e67652 /archival/tar.c
parentd9c8ab40a485aa8a7fae92a5d2bbada0e7513ef3 (diff)
downloadbusybox-e857122c97b934a00252889a978db69d4e774df7.zip
busybox-e857122c97b934a00252889a978db69d4e774df7.tar.gz
Fix tar-handles-nested-exclude testcase
Diffstat (limited to 'archival/tar.c')
-rw-r--r--archival/tar.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/archival/tar.c b/archival/tar.c
index c8a2bd3..b3fa447 100644
--- a/archival/tar.c
+++ b/archival/tar.c
@@ -731,6 +731,11 @@ int tar_main(int argc, char **argv)
/* Setup an array of filenames to work with */
/* TODO: This is the same as in ar, seperate function ? */
while (optind < argc) {
+ char *filename_ptr;
+ filename_ptr = last_char_is(argv[optind], '/');
+ if (filename_ptr) {
+ *filename_ptr = '\0';
+ }
tar_handle->accept = llist_add_to(tar_handle->accept, argv[optind]);
optind++;
}