Try not to use verbatim paths for UNC shares (#6824)

This commit is contained in:
Chris Denton
2022-10-22 17:51:52 +01:00
committed by GitHub
parent 3f555a6836
commit 89f3cbf318
6 changed files with 46 additions and 11 deletions

View File

@ -1,5 +1,7 @@
use std::path::{is_separator, Component, Path, PathBuf};
use super::helpers;
const EXPAND_STR: &str = if cfg!(windows) { r"..\" } else { "../" };
fn handle_dots_push(string: &mut String, count: u8) {
@ -108,7 +110,7 @@ pub fn expand_dots(path: impl AsRef<Path>) -> PathBuf {
_ => result.push(component),
});
dunce::simplified(&result).to_path_buf()
helpers::simiplified(&result)
}
#[cfg(test)]