[BusyBox] Re: "tar" with a directory argument doesn't extract the directory recursively

Rob Landley rob at landley.net
Fri May 20 02:58:41 UTC 2005


On Thursday 19 May 2005 04:52 pm, Ben Giddings wrote:
> I could modify this function myself to do what I think it should do, but I
> don't know what else I'll break in the process.

Easiest thing to do is submit a patch and see who complains.  (The fastest way 
to get other people to come up with a good patch is to submit a bad patch 
that looks like it'll be merged.  I'm not joking.)

> First of all, do people agree that if an tarball contains a directory 'foo'
> containing a file 'README.TXT' the command
>
> tar xf foo.tar foo
>
> should create the directory 'foo' and put the file README.TXT into it?

Assuming there isn't already a file called "foo" that the directory would have 
to stomp.  Easiest thing to do is see what an existing "standard" tar 
implementation does in the corner cases, then decide if that behavior is sane 
or not.  (In the case of sed, I found two or three instances where the 
existing behavior was NOT sane.  But mostly it was.)

> If so, is the solution to change find_list_entry, or will that break other
> things?

We can test the other things for breakage once we've got the patch.

> Ben

Rob



More information about the busybox mailing list