Open thrau opened 10 years ago
@thrau , great lib! Any plans on implementing this feature?
are you on nix or windows? the problem is really that the java file permissions are very course grained and there's no good way of reading them in a cross-platform way. for nix we could maybe just use a similar mechanism as with permission restoring.
In my case I'm more concerned about execution permissions on *nix platforms. It turned out to be a relatively simple thing to do. I just added this line for each decompressed file (entry is declared as TarArchiveEntry entry
)
Files.setAttribute(file.toPath(), "unix:mode", entry.getMode());
Restoring file permissions on extraction works with #14, however there are no clean mechanisms for reading permissions from a
File
and setting them in anArchiveEntry
.