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

Support following symbolic links to *files* as well #37

Open
mirabilos opened this issue Jan 8, 2021 · 5 comments · May be fixed by #38
Open

Support following symbolic links to *files* as well #37

mirabilos opened this issue Jan 8, 2021 · 5 comments · May be fixed by #38

Comments

@mirabilos
Copy link

From my analysis of the problem in codehaus-plexus/plexus-archiver#160 (comment) changes in plexus-io are needed to support following symbolic links to files (not directories).

We can track the plexus-io part here.

mirabilos added a commit to qvest-digital/plexus-io that referenced this issue Jan 8, 2021
@mirabilos
Copy link
Author

I think I’ve got it; for plexus-io even configurable (following the already extant follow-symlinks setting). I’ll provide a PR shortly.

mirabilos added a commit to qvest-digital/plexus-io that referenced this issue Jan 8, 2021
This implements the necessary support to allow plexus-archiver to
archive the contents of symlinks (instead of the symbolic links
themselves), depending on the (already-extant) follow-symlinks flag.

Closes: codehaus-plexus#37

Signed-off-by: mirabilos <[email protected]>
@mirabilos mirabilos linked a pull request Jan 8, 2021 that will close this issue
@plamentotev
Copy link
Member

plamentotev commented Jan 9, 2021

While it may not be intuitive I think PlexusIoFileResourceCollection works as intended. This collection return a collection of files as they are on the file system. This includes symlinks. It is up to the caller to decide how to handle symlinks. The flag affect only dirs as it affects which files are going to be included.

I think it would be better to keep the collection as it is, but while compressing Plexus Archiver should follow the symlink instead of adding it to the archive..

@mirabilos
Copy link
Author

I don’t think so. It already includes a “follow symlinks” mode, which just doesn’t work “right”, it only follows symlinks to directories, which I haven’t seen anywhere else.

I replied in more detail in codehaus-plexus/plexus-archiver#160 (comment)

@plamentotev
Copy link
Member

Now that I had time to look again on the pull request it does make sense. I'm only concerned that it changes the default behavior of a code that existed for quite some time. Callers that haven't set the follow sym links flag at all will not get the sym links. That may break existing applications without them even knowing they are affected by the change.

@mirabilos
Copy link
Author

mirabilos commented Apr 18, 2021 via email

mirabilos added a commit to qvest-digital/maven-parent that referenced this issue Jun 25, 2024
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 a pull request may close this issue.

2 participants