Make UNC share name part of root in splitRoot#3219
Merged
Conversation
splitRoot for a Windows UNC path now returns the entire \\server\share (or \\?\UNC\server\share) as the root, instead of treating the share name as the first component of path body. This makes the root self-contained and fixes the case-folding gap noted in f3b293c: the share name follows the root's case-insensitivity rule, not the body's. - splitRoot: for UNC paths, split point moves past the share name. - validatePath: a UNC path must now have a non-empty server and share separated by exactly one separator. Paths like "\\x\" (server only) are rejected. A valid share root itself remains a valid path under validatePath' since it is a listable directory. - eqPath / normalise: the entire UNC root (server + share) is folded case-insensitively; the share no longer follows ignoreCase. - Verbatim "\\?\..." paths still bypass all normalisation byte-for-byte.
76970c0 to
cce03c5
Compare
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.
splitRoot for a Windows UNC path now returns the entire \server\share (or \?\UNC\server\share) as the root, instead of treating the share name as the first component of path body. This makes the root self-contained and fixes the case-folding gap noted in f3b293c: the share name follows the root's case-insensitivity rule, not the body's.