aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDenis Vlasenko <vda.linux@googlemail.com>2006-09-02 18:40:10 +0000
committerDenis Vlasenko <vda.linux@googlemail.com>2006-09-02 18:40:10 +0000
commit06ab5fb6b9d641ee184facb81eaee718e418d9b2 (patch)
tree20ca95fe4097b5205c9d90b31bd6284e485885d7
parentbcf4908e714644add18fad1614e8b0dea071960d (diff)
downloadbusybox-w32-06ab5fb6b9d641ee184facb81eaee718e418d9b2.tar.gz
busybox-w32-06ab5fb6b9d641ee184facb81eaee718e418d9b2.tar.bz2
busybox-w32-06ab5fb6b9d641ee184facb81eaee718e418d9b2.zip
tar: tar xf foo.tar dir/dir did not extract all subdirs.
Added testsuite entry for this
-rw-r--r--archival/libunarchive/find_list_entry.c2
-rw-r--r--testsuite/README3
-rw-r--r--testsuite/tar/tar-extracts-all-subdirs12
3 files changed, 16 insertions, 1 deletions
diff --git a/archival/libunarchive/find_list_entry.c b/archival/libunarchive/find_list_entry.c
index 49bdd2d09..57ffec6ec 100644
--- a/archival/libunarchive/find_list_entry.c
+++ b/archival/libunarchive/find_list_entry.c
@@ -13,7 +13,7 @@
13const llist_t *find_list_entry(const llist_t *list, const char *filename) 13const llist_t *find_list_entry(const llist_t *list, const char *filename)
14{ 14{
15 while (list) { 15 while (list) {
16 if (fnmatch(list->data, filename, 0) == 0) { 16 if (fnmatch(list->data, filename, FNM_LEADING_DIR) == 0) {
17 return (list); 17 return (list);
18 } 18 }
19 list = list->link; 19 list = list->link;
diff --git a/testsuite/README b/testsuite/README
index 40439bfe8..377f20ef8 100644
--- a/testsuite/README
+++ b/testsuite/README
@@ -1,3 +1,6 @@
1Update: doesn't work as described. Try "make check" from parent dir...
2* * *
3
1To run the test suite, change to this directory and run "./runtest". It will 4To run the test suite, change to this directory and run "./runtest". It will
2run all of the test cases, and list those with unexpected outcomes. Adding the 5run all of the test cases, and list those with unexpected outcomes. Adding the
3-v option will cause it to show expected outcomes as well. To only run the test 6-v option will cause it to show expected outcomes as well. To only run the test
diff --git a/testsuite/tar/tar-extracts-all-subdirs b/testsuite/tar/tar-extracts-all-subdirs
new file mode 100644
index 000000000..886c37ce9
--- /dev/null
+++ b/testsuite/tar/tar-extracts-all-subdirs
@@ -0,0 +1,12 @@
1# FEATURE: CONFIG_FEATURE_TAR_CREATE
2mkdir -p foo/{1,2,3}
3mkdir -p foo/1/{10,11}
4mkdir -p foo/1/10/{100,101,102}
5tar cf foo.tar -C foo .
6rm -rf foo/*
7busybox tar xf foo.tar -C foo ./1/10
8find foo | sort >logfile.bb
9rm -rf foo/*
10tar xf foo.tar -C foo ./1/10
11find foo | sort >logfile.gnu
12cmp logfile.gnu logfile.bb