diff --git a/rust/hg-core/src/utils/path_auditor.rs b/rust/hg-core/src/utils/path_auditor.rs --- a/rust/hg-core/src/utils/path_auditor.rs +++ b/rust/hg-core/src/utils/path_auditor.rs @@ -67,7 +67,7 @@ // Windows shortname aliases for part in parts.iter() { if part.contains(&b'~') { - let mut split = part.splitn(1, |b| *b == b'~'); + let mut split = part.splitn(2, |b| *b == b'~'); let first = split.next().unwrap().to_owned().to_ascii_uppercase(); let last = split.next().unwrap();