# HG changeset patch # User Raphaël Gomès # Date 1583331003 -3600 # Node ID e63b4a1f22716544876ccef6775a1e45dbc85723 # Parent c989737158aa8036b60c22d4cd0f2a87f1b83896 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 diff -r c989737158aa -r e63b4a1f2271 rust/hg-core/src/utils/path_auditor.rs --- 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();