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

Relativize symlinks where possible #1251

Merged
merged 1 commit into from
Aug 5, 2023

Conversation

j-baker
Copy link
Contributor

@j-baker j-baker commented Aug 5, 2023

Attempt to relativize symlinks. Fixes #1250.

  • Do not relativize where target or link are relative paths.
  • Do not relativize where CARGO_TARGET_DIR is set, as this indicates that relativizing might not be helpful.
  • Do not relativize where source or target contain ..

It feels a bit weird where it is because the module is filesystem-specific, cxx-agnostic, but I justified it to myself on the basis that it's cxx's interface for interacting with the filesystem specifically for the purpose of writing output.

Attempt to relativize symlinks. Fixes dtolnay#1250.

- Do not relativize where target or link are relative paths.
- Do not relativize where CARGO_TARGET_DIR is set, as this indicates
  that relativizing might not be helpful.
- Do not relativize where source or target contain `..`
Copy link
Owner

@dtolnay dtolnay left a comment

Choose a reason for hiding this comment

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

Thanks!

@dtolnay dtolnay merged commit e5856ee into dtolnay:master Aug 5, 2023
15 checks passed
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.

Emit with relative symlinks?
2 participants