Skip to content

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

Open
@mirabilos

Description

@mirabilos

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.

Activity

added a commit that references this issue on Jan 8, 2021
cc9b57b
mirabilos

mirabilos commented on Jan 8, 2021

@mirabilos
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.

added a commit that references this issue on Jan 8, 2021
linked a pull request that will close this issue on Jan 8, 2021
plamentotev

plamentotev commented on Jan 9, 2021

@plamentotev
Member

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

mirabilos commented on Jan 9, 2021

@mirabilos
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

plamentotev commented on Mar 3, 2021

@plamentotev
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

mirabilos commented on Apr 18, 2021

@mirabilos
Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @mirabilos@plamentotev

      Issue actions

        Support following symbolic links to *files* as well · Issue #37 · codehaus-plexus/plexus-io