Skip to content

Commit

Permalink
Fix for upper case extensions
Browse files Browse the repository at this point in the history
  • Loading branch information
blopker committed Dec 17, 2024
1 parent 3be02d3 commit 3741b24
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Unreleased

# 2.0.6

- Allow for upper case extensions

# 2.0.5

- Add update checker
Expand Down
9 changes: 7 additions & 2 deletions src-tauri/src/compress.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,8 +490,13 @@ fn is_image(path: &Path) -> bool {
return false;
}
let supported_exts = ["png", "jpeg", "jpg", "gif", "webp", "tiff"];
let ext = path.extension().unwrap_or_default();
if !supported_exts.contains(&ext.to_str().unwrap()) {
let ext = path
.extension()
.unwrap_or_default()
.to_str()
.unwrap()
.to_lowercase();
if !supported_exts.contains(&ext.as_str()) {
return false;
}
true
Expand Down
2 changes: 1 addition & 1 deletion src-tauri/tauri.conf.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"$schema": "https://schema.tauri.app/config/2",
"mainBinaryName": "Alic",
"productName": "Alic Image Compressor",
"version": "2.0.5",
"version": "2.0.6",
"identifier": "io.kbl.alic",
"build": {
"beforeDevCommand": "bun run dev",
Expand Down

0 comments on commit 3741b24

Please sign in to comment.