Skip to content

FoundationEssentials: simplify path normalization #603

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

Merged
merged 1 commit into from
May 13, 2024

Conversation

compnerd
Copy link
Member

We would previously conditionally call GetFullPathNameW and do string manipulations for normalising the path. Instead, always call GetFullPathNameW to normalise the path as per Windows' rules. This more importantly will collapse runs of the arc separator, which is crucial when using extended paths as the NT path form must always use the normalised paths or the access will fail.

@compnerd compnerd requested review from parkera and jmschonfeld May 10, 2024 14:46
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd
Copy link
Member Author

@swift-ci please test

We would previously conditionally call `GetFullPathNameW` and do string
manipulations for normalising the path. Instead, always call
`GetFullPathNameW` to normalise the path as per Windows' rules. This
more importantly will collapse runs of the arc separator, which is
crucial when using extended paths as the NT path form must always use
the normalised paths or the access will fail.
@compnerd
Copy link
Member Author

@swift-ci please test

@compnerd compnerd requested a review from jmschonfeld May 10, 2024 22:50
@jmschonfeld jmschonfeld merged commit 8bdf040 into swiftlang:main May 13, 2024
@compnerd compnerd deleted the normalization branch May 13, 2024 20:18
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.

3 participants