Repository: shssoichiro/oxipng (language: rust)

Issue:
Case sensitive names under Windows
oxipng-9.1.1-x86_64-pc-windows-msvc.zip, W10

"oxipng *.png" optimizes *.png and ignores *.PNG



Discussion / hints:

Fix patch:
diff --git a/src/main.rs b/src/main.rs
index 76472b85..7fe66a26 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -157,7 +157,8 @@ fn collect_files(
 fn apply_glob_pattern(path: PathBuf) -> Vec<PathBuf> {
     let matches = path
         .to_str()
-        .and_then(|pattern| glob::glob(pattern).ok())
+        // Use MatchOptions::default() to disable case-sensitivity
+        .and_then(|pattern| glob::glob_with(pattern, glob::MatchOptions::default()).ok())
         .map(|paths| paths.flatten().collect::<Vec<_>>());
 
     match matches {


Test patch: