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

Avoid canonicalizing executables on Windows #5446

Merged
merged 3 commits into from
Jul 26, 2024
Merged

Avoid canonicalizing executables on Windows #5446

merged 3 commits into from
Jul 26, 2024

Conversation

charliermarsh
Copy link
Member

@charliermarsh charliermarsh commented Jul 25, 2024

Summary

If you have an executable path on a network share path (like \\some-host\some-share\...\python.exe), canonicalizing it adds the \\? prefix, but dunce cannot safely strip it.

This PR changes the Windows logic to avoid canonicalizing altogether. We don't really expect symlinks on Windows, so it seems unimportant to resolve them.

Closes: #5440.

@charliermarsh charliermarsh force-pushed the charlie/unc branch 2 times, most recently from 809d7ec to f685137 Compare July 26, 2024 01:15
@charliermarsh charliermarsh marked this pull request as ready for review July 26, 2024 01:15
@charliermarsh charliermarsh changed the title Avoid UNC paths for executables Avoid canonicalizing executables on Windows Jul 26, 2024
@charliermarsh charliermarsh added bug Something isn't working windows Specific to the Windows platform labels Jul 26, 2024
Copy link
Member

@konstin konstin left a comment

Choose a reason for hiding this comment

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

LGTM

@paveldikov
Copy link
Contributor

Verified ee1e20c solves issue for me.

@charliermarsh charliermarsh merged commit 8b8f34a into main Jul 26, 2024
55 checks passed
@charliermarsh charliermarsh deleted the charlie/unc branch July 26, 2024 12:57
@charliermarsh
Copy link
Member Author

Let's give it a try.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working windows Specific to the Windows platform
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Consider using dunce for paths on Windows (not just for display)
3 participants