Skip to content
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

TarExtractor not handling directories correctly? #20

Open
feichh opened this issue May 16, 2013 · 3 comments
Open

TarExtractor not handling directories correctly? #20

feichh opened this issue May 16, 2013 · 3 comments

Comments

@feichh
Copy link

feichh commented May 16, 2013

Im trying to use the action "org.meshpoint.anode.INSTALL", I noticed the org.meshpoint.anode.util.TarExtractor does not deal with directories corretly.
My temp solution for this is as follows (~l.60f):
if (entry.isDirectory()) {
entryFile.mkdir();
} else {
FileOutputStream fos = new FileOutputStream(entryFile);
BufferedOutputStream bos = new BufferedOutputStream(fos);
while ((count = tis.read(buf)) != -1) {
bos.write(buf, 0, count);
}
bos.flush();
bos.close();
}

Maybe you want to take a look at this.

cheers

@paddybyers
Copy link
Owner

OK, well spotted - do you want to do a pull request?

Thanks

@feichh
Copy link
Author

feichh commented May 17, 2013

sure, as soon as I feel confident that it works correctly.
I have an additional issue with "././@LongLink" entries as well.

cheers

@feichh
Copy link
Author

feichh commented May 17, 2013

so it seems jtar does not support all possible formats:
kamranzafar/jtar#6
hopefully jtar will add support.
I send you a pull request with my current fix.
see, whether you can use it.

cheers, thx

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants