path: canonicalize Windows namespaced paths#62639
Closed
jazelly wants to merge 1 commit into
Closed
Conversation
8a63ce2 to
9c279df
Compare
|
Another PR which provides a simpler fix for those issues. Ideally this PR should handle the |
6468284 to
d0dc6a0
Compare
Member
Author
|
@johncrim I think that's two different things, although very close, to fix. This PR aims to fix the extended path on windows. |
Canonicalize Windows namespaced paths at internal filesystem identity boundaries. Valid namespaced drive and UNC paths identify the same filesystem objects as their non-namespaced spelling, so internal cache, permission, and module lookups should compare the canonical identity rather than the user-provided spelling. Only the two known filesystem-equivalent namespace forms are rewritten: \\?\C:\... and \\?\UNC\server\share\.... Other namespaced forms are preserved because they may refer to device or drive-relative semantics that are not equivalent to ordinary drive or UNC paths. Signed-off-by: jazelly <xzha4350@gmail.com>
Member
Author
|
After second thoughts and understanding to other mentioned issues, I think we should take care of them at the js layer to be safer. Closing this |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Canonicalize valid Windows namespaced drive and UNC filesystem paths by stripping the prefix in these 2 kinds
This is safe for ToNamespacedPath() because it resolves to the regular drive or UNC spelling before adding the namespace prefix back for Windows filesystem calls.
Fixes: #62446