[BusyBox] [PATCH] bugfix for tar
Jonas Holmberg
jonas.holmberg at axis.com
Mon Oct 25 12:15:37 UTC 2004
"tar [xt]f my.tar dir" doesn't extract/list files located in "dir" in
the tarball. The following patch solves that, but I'm not sure if it
breaks something else:
--- archival/libunarchive/find_list_entry.c 28 May 2004 11:38:17 -0000 1.1.1.1
+++ archival/libunarchive/find_list_entry.c 25 Oct 2004 12:02:46 -0000
@@ -21,7 +21,7 @@
extern const llist_t *find_list_entry(const llist_t *list, const char *filename)
{
while (list) {
- if (fnmatch(list->data, filename, 0) == 0) {
+ if (fnmatch(list->data, filename, FNM_LEADING_DIR) == 0) {
return(list);
}
list = list->link;
The man page for fnmatch(3) says that FNM_LEADING_DIR is a GNU
extension, but the patch works fine with uClibc as well.
/Jonas
More information about the busybox
mailing list