Skip to main content

clean_path

Function clean_path 

Source
pub fn clean_path(path: PathBuf) -> PathBuf
Expand description

Strip the Windows extended-length path prefix (\\?\) if present.

Path::canonicalize() on Windows produces paths like \\?\C:\Users\.... This prefix is valid but looks ugly in UI and HTML output. This function strips it when the remaining path is a simple absolute path (drive letter).