While we still don't handle filenames properly cross-platform, this at least
sticks closer to the Python behavior.
Details
Details
Diff Detail
Diff Detail
- Repository
- rHG Mercurial
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Event Timeline
Comment Actions
+/ TODO improve handling of utf8 file names. Our overall strategy for
+/ filenames has to be revisited anyway, since Windows is UTF-16.
+pub fn normalize_case(bytes: &[u8]) -> Vec<u8> {
+ #[cfg(windows)] // NTFS compares via upper()
+ return bytes.to_ascii_uppercase();
+ #[cfg(unix)]
+ bytes.to_ascii_lowercase()
+}
HFS+ has more complex rules, and some were the source of security issue.