[SOLVED] why "tar" extraction using "--exclude" is brain-damaged

Glenn L. McGrath bug1 at ihug.co.nz
Wed Apr 12 20:56:21 UTC 2006


On Wed, 12 Apr 2006 16:34:50 -0400 (EDT)
"Robert P. J. Day" <rpjday at mindspring.com> wrote:

>   *that* filename matching uses simply:
> 
> 	if (fnmatch(list->data, filename, 0) == 0)
> 
> replacing it with:
> 
> 	if (fnmatch(list->data, filename, FNM_LEADING_DIR) == 0)

$ grep find_list_entry -r * | cut -f -1 -d ':' | grep -v .svn | grep
"\.c" archival/tar.c
archival/tar.c
archival/libunarchive/filter_accept_list_reassign.c
archival/libunarchive/filter_accept_reject_list.c
archival/libunarchive/filter_accept_reject_list.c
archival/libunarchive/find_list_entry.c
archival/libunarchive/filter_accept_list.c
archival/unzip.c
archival/unzip.c

Before this is checked in someone would have to check that it doesnt
break unzip or any of the other applets that use those those
libunarchive files, i.e. ar, cpio, dpkg (and maybe ive forgoten another
one ?)

It becomes more compex when you share code.


Glenn



More information about the busybox mailing list