From 9daac423487a7473531aaa83173090afed8f14b0 Mon Sep 17 00:00:00 2001 From: "NGnius (Graham)" Date: Sun, 27 Mar 2022 19:19:03 -0400 Subject: [PATCH] Make file ordering ignore case --- mps-interpreter/src/processing/filesystem.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mps-interpreter/src/processing/filesystem.rs b/mps-interpreter/src/processing/filesystem.rs index 8e0826a..18ff800 100644 --- a/mps-interpreter/src/processing/filesystem.rs +++ b/mps-interpreter/src/processing/filesystem.rs @@ -41,7 +41,10 @@ impl Iterator for SortedReadDir { } } self.dir_iter_complete = true; - self.cache.sort_by(|a, b| b.path().cmp(&a.path())); + self.cache.sort_by( + |a, b| b.path().to_string_lossy().to_lowercase().cmp( + &a.path().to_string_lossy().to_lowercase()) + ); } if self.cache.is_empty() { None