Skip to content

Preserve symbolic links when using Archiver::addArchivedFileSet #11

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

Merged
merged 4 commits into from
Nov 24, 2015
Merged

Preserve symbolic links when using Archiver::addArchivedFileSet #11

merged 4 commits into from
Nov 24, 2015

Conversation

plamentotev
Copy link
Member

Plexus Archiver does support symbolic links in ZIP and tar archive formats. But if you try to add the content of one archive to another using Archiver::addArchivedFileSet, you'll end up with zero byte ordinary files instead of the symbolic links in the original archive.

This series of commits fixes that so symbolic links are properly preserved.

When ZIP file is created the last modified time is stored in MS-DOS
formated date(if it's in the valid range for MS-DOS time), but when it's
read the last modification time from extra field data is used.

When ZIP file is created from the content of other ZIP file created with
third-party tool the last modified time might differ with one second.

Modify ArchiveFileComparator so two ZIP files are still considered equal
if their entries' last modified time vary only by one second.
@krosenvold krosenvold merged commit f713c5d into codehaus-plexus:master Nov 24, 2015
krosenvold added a commit that referenced this pull request Nov 24, 2015
@krosenvold
Copy link
Member

Merged, Thanks a lot !

@plamentotev plamentotev deleted the symlinks-archived-file-set branch November 30, 2015 19:15
@plamentotev
Copy link
Member Author

Actually it looks like somehow I've missed the PlexusArchiverZipFileResourceCollection 😞

@plamentotev plamentotev restored the symlinks-archived-file-set branch December 11, 2015 19:31
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

Successfully merging this pull request may close these issues.

2 participants