-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for symlinks #40
Comments
I was really hoping to use your wrapper because it truly is the API I think Apache should have provided from the start! Unfortunately, I just discovered this bug/missing feature for myself. Any chance you implement it? |
Unfortunately, there is no clear way to generalize handling of symlinks across archive formats. Also, I don't see any easy solution without Java 7+ nio. So this is definitely not on my radar for now, sorry. |
That's too bad. Thanks for getting back quickly so I know to find another solution though. I found a solution that should work quite nicely, though it isn't pure java. Some context: my application already requires being able to invoke external processes that may be found via the final File tarExe = executableFinder.find("tar");
if (tarExe.exists()) {
ArchiverFactory.createArchive("tar", "gz").extract(theArchivePath, theOutputPath);
} else {
final int exitCode = new ProcessBuilder("tar", "xf", theArchivePath)
.directory(theOutputPath)
.start()
.waitFor();
if (0 != exitCode) {
// handle error
}
} I like this because any system that doesn't have |
Currently links are not supported at all. Depending on the archive type, weird things will happen.
The text was updated successfully, but these errors were encountered: