Skip to content

Make UNC share name part of root in splitRoot#3219

Merged
harendra-kumar merged 1 commit into
masterfrom
path-improvements-2
May 17, 2026
Merged

Make UNC share name part of root in splitRoot#3219
harendra-kumar merged 1 commit into
masterfrom
path-improvements-2

Conversation

@harendra-kumar
Copy link
Copy Markdown
Member

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.

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.
@harendra-kumar harendra-kumar merged commit cce03c5 into master May 17, 2026
18 of 19 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.

1 participant