rust-pathauditor: actually split Windows shortname aliases at `~`
Right now, splitting with a max of 1 parts is useless.
Differential Revision: https://phab.mercurial-scm.org/D8211
--- a/rust/hg-core/src/utils/path_auditor.rs Thu Mar 05 10:24:45 2020 +0100
+++ b/rust/hg-core/src/utils/path_auditor.rs Wed Mar 04 15:10:03 2020 +0100
@@ -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();