pub fn simplified(path: PathBuf) -> PathBufExpand description
Parse the :-separated WINX_ALLOW_PATHS value into canonical roots.
Entries must be absolute (relative to what would be ambiguous — the tools
that use this run with a per-session cwd) and must exist, so that the roots
are canonical and comparable with starts_with. Anything else is dropped
with a warning: a typo’d root silently widening nothing is the safe failure.
Strip Windows’ extended-length (\\?\) prefix from a canonical path.
std::fs::canonicalize returns the verbatim form on Windows. That form is
rejected as a cmd.exe working directory, never appears in user-supplied
paths, and gets copied by models into commands, so every canonical path Winx
stores, compares, or shows is simplified to the plain C:\… spelling. Rust’s
std re-adds the prefix internally when a path exceeds MAX_PATH.