BKF
This commit is contained in:
parent
b32785aae7
commit
4e07992893
|
@ -140,8 +140,10 @@ impl Directories {
|
||||||
// This can be check by checking if path starts with \\?\UNC\
|
// This can be check by checking if path starts with \\?\UNC\
|
||||||
if let Ok(dir_can) = directory.canonicalize() {
|
if let Ok(dir_can) = directory.canonicalize() {
|
||||||
let dir_can_str = dir_can.to_string_lossy().to_string();
|
let dir_can_str = dir_can.to_string_lossy().to_string();
|
||||||
if dir_can_str.starts_with(r"\\?\") && dir_can_str.chars().nth(5) == Some(':') {
|
if let Some(dir_can_str) = dir_can_str.strip_prefix(r"\\?\") {
|
||||||
directory = PathBuf::from(dir_can_str);
|
if dir_can_str.chars().nth(1) == Some(':') {
|
||||||
|
directory = PathBuf::from(dir_can_str);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
dbg!("After canonicalize", &directory);
|
dbg!("After canonicalize", &directory);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue