Match IO extensions in a case-insensitive manner (#2683)

This commit is contained in:
Abdo 2023-09-26 06:14:59 +03:00 committed by GitHub
parent bccc5b0995
commit 4cf2ab35ab
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,7 +150,7 @@ impl Collection {
if meta.is_file() { if meta.is_file() {
if let Some(ext_osstr) = file_path.extension() { if let Some(ext_osstr) = file_path.extension() {
if let Some(ext_str) = ext_osstr.to_str() { if let Some(ext_str) = ext_osstr.to_str() {
if supported_extensions.contains(&ext_str) { if supported_extensions.contains(&ext_str.to_lowercase().as_str()) {
return Ok(true); return Ok(true);
} }
} }