Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@wagoodman
Copy link
Contributor

Before link resolution was done for ancestors, only leaf nodes in the file tree could be links. Now it is possible for ancestors of a path to have symlinks. This PR ensures that only the "real path" representation for a result (a path with no links) is surfaced during globbing, not necessarily the path matched against the glob pattern.

Also, the source.Location currently used to adapt to file.Reference has been enhanced to act as a more accurate key for content fetch requests by adding the resulting virtual path from the glob result onto the struct (which my have ancestor paths with symlinks).

@wagoodman wagoodman added the bug Something isn't working label Jan 6, 2021
@wagoodman wagoodman requested a review from a team January 6, 2021 02:19
@wagoodman wagoodman self-assigned this Jan 6, 2021
@wagoodman wagoodman merged commit 0f62888 into main Jan 6, 2021
@wagoodman wagoodman deleted the prefer-real-paths-on-glob-results branch January 6, 2021 02:32
GijsCalis pushed a commit to GijsCalis/syft that referenced this pull request Feb 19, 2024
…-results

Prefer real paths over those with links for glob results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants