Support zip permissions and symlinks with Apache Commons Compress #372
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Use Apache Commons Compress to support symlinks and permissions.
This supports
os.zip(for new zips, not modification),os.zip.streamandos.unzip.Supporting symlinks and permissions for
os.unzip.streamis impossible since the information is stored in the central directory at the end of the zip file, not together with each zip entry.ZipFiledoesn't support modifying entries in place. Thusos.zipmodification would still requirejdk.zipfs, which doesn't support symlinks, and only supports permissions since JDK 14.Apache Commons Compress is quite heavy a dependency since it also includes support for other compressing formats, and also depends on Apache Commons IO. A more light weight alternative would be to vendor
org.apache.tools.zipfrom Apache Ant (which is basically the same thing as Apache Commons Compress). See my other branch that goes with this approach.What's missing?
src-jvm