schwer-q / xar

Automatically exported from code.google.com/p/xar
0 stars 0 forks source link

Extraction of of a directory produces only the directory, not its contents #11

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?

imd20:jberry ~/Projects/macports/users/jberry/test % ls
portpkg.xar xpkg
imd20:jberry ~/Projects/macports/users/jberry/test % xar -tf portpkg.xar 
portpkg
portpkg/files
portpkg/Portfile
imd20:jberry ~/Projects/macports/users/jberry/test % xar -xf portpkg.xar portpkg
imd20:jberry ~/Projects/macports/users/jberry/test % ls portpkg
imd20:jberry ~/Projects/macports/users/jberry/test % ls
portpkg     portpkg.xar xpkg
imd20:jberry ~/Projects/macports/users/jberry/test % 

What is the expected output? What do you see instead?
I expect the portpkg directory to have the contents as shown in the -t listing.

What version of the product are you using? On what operating system?
1.4 on Mac OS X 10.4.9

Original issue reported on code.google.com by culin...@gmail.com on 6 Apr 2007 at 11:31

GoogleCodeExporter commented 9 years ago
Hey Rob: yeah, this also occurs on the latest trunk r117.

It seems like that when the xar command line is given a paticular name to 
extract, that it doesn't do so 
recursively. So that works okay for a single file, of course, but not for a 
directory tree. In the same situation, tar 
would extract the entire tree, which is the useful behavior.

Original comment by culin...@gmail.com on 7 Apr 2007 at 4:12

GoogleCodeExporter commented 9 years ago
To resolve this issue, I did 2 things:
1) added the ability to specify a POSIX regex when extracting a file, such as:
xar -xvf foo.xar "dir/.*"

2) added an implicit regex to extraction, adding "/.*" to entries specified for
extraction.

Check out the current trunk and let me know how it works for you.

Original comment by bbraun on 9 Apr 2007 at 7:10