pub fn normalize_windows_command_paths(command: &str) -> StringExpand description
Normalize Windows absolute path spellings before any POSIX-style splitter
(shlex / shell_words) or glob-charset gate in this module:
Path::canonicalizeon Windows embeds the verbatim prefix\\?\C:\...whose?trips the glob-charset gates and whose backslashes the POSIX splitters eat as escapes; strip it so the remaining spelling resolves to the same location (device\\.\paths are preserved verbatim);- double the backslashes of Windows-absolute-path-like words so the
splitters round-trip the real path instead of
C:\Users\...collapsing toC:Users....
Words that do not look like Windows absolute paths are untouched, so POSIX escapes and unix hosts are unaffected.