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

Make GetPathRelativeTo() resolve symbolic links #78

Merged
merged 2 commits into from
Oct 25, 2022

Conversation

infraredgirl
Copy link
Contributor

@infraredgirl infraredgirl commented Oct 25, 2022

Related to #75.

Without this change the relative paths are not computed correctly in case when basePath is a subfolder of path, and one of them is a symbolic link of the other.

Note that I had to create fixtures for test cases of GetPathRelativeTo(), because the filepath.EvalSymlinks() method that we're now using is actually looking for files on disk.

zackproser
zackproser previously approved these changes Oct 25, 2022
Copy link
Contributor

@zackproser zackproser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@zackproser zackproser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@infraredgirl
Copy link
Contributor Author

Thanks for the review, Zack! Merging.

@infraredgirl infraredgirl merged commit 027003c into master Oct 25, 2022
@infraredgirl infraredgirl deleted the fix-GetPathRelativeTo branch October 25, 2022 11:08
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