Skip to content

glob: Inconsistent behavior with symlinks #222

@IgorEisberg

Description

@IgorEisberg

Hey, so I'm using the following setup:

    flags = NEGATE | DOTGLOB | EXTGLOB | GLOBSTAR | BRACE | SPLIT | NEGATEALL | GLOBTILDE | NODOTDIR

    matches = [
        match for match in glob(pattern, flags=flags)
        # rest of code
    ]

I know that when using the pattern '**', it does not follow symlinks by default. The problem is that the symlink is completely missing in the results like it doesn't exist. It would be nice to have the option to glob without following symlinks at all and treating them as a path to a normal file (like the default behavior of find command which includes symlinks in the results but doesn't resolve or follow them by default).

Metadata

Metadata

Assignees

No one assigned

    Labels

    S: triageIssue needs triage.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions