diff --git a/CHANGELOG.md b/CHANGELOG.md index 264984d..d8215be 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - **--verbose** which prints detailed logs. +### Changed + +- Selector now case-insensitive, so it selects mp4 and MP4 etc. + ## 🎉 [0.3.2] - 2024-01-14 ### Added diff --git a/src/helpers/vec_helper.rs b/src/helpers/vec_helper.rs index a8c7e57..fa800a9 100644 --- a/src/helpers/vec_helper.rs +++ b/src/helpers/vec_helper.rs @@ -5,8 +5,9 @@ use regex::Regex; /// Returns a vector of PathBufs that match the given file format. /// Also filters out files that start with a dot. pub fn filter_files(all_files: Vec, file_format: &str) -> Vec { - let re = Regex::new(format!(r"[\\/][^.\\/][^\\/]*\.{}$", regex::escape(file_format)).as_str()) - .unwrap(); + let re: Regex = + Regex::new(format!(r"(?i)[\\/][^.\\/][^\\/]*\.{}$", regex::escape(file_format)).as_str()) + .unwrap(); let mut filtered_files = Vec::new(); for possible_file_to_merge in all_files {