Auto merge of #14799 - mataha:fix/root-in-verbatim-prefix, r=Veykril

Remove root component from patched Windows UNC path prefix

As it shouldn't be there to begin with (per discussion in #14689).
This commit is contained in:
bors 2023-05-13 17:02:38 +00:00
commit f38264fa56

View File

@ -246,7 +246,7 @@ fn patch_path_prefix(path: PathBuf) -> PathBuf {
format!("{}:", d.to_ascii_uppercase() as char) format!("{}:", d.to_ascii_uppercase() as char)
} }
Prefix::VerbatimDisk(d) => { Prefix::VerbatimDisk(d) => {
format!(r"\\?\{}:\", d.to_ascii_uppercase() as char) format!(r"\\?\{}:", d.to_ascii_uppercase() as char)
} }
_ => return path, _ => return path,
}; };