Skip to content

Commit

Permalink
fix: make file extension check case-insensitive (#22)
Browse files Browse the repository at this point in the history
Co-authored-by: mike <[email protected]>
  • Loading branch information
mike-schmid and mike authored Jul 30, 2024
1 parent 9c1b288 commit 6c314e8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ use tempfile::tempdir;

pub fn get_qr_bill_data(file_path: String, fail_on_error: bool) -> Vec<QRData> {
let tmp_dir = tempdir().expect("Error creating temporary directory");
let images = match file_path.as_str() {

let images = match file_path.to_lowercase().as_str() {
input if input.ends_with(".pdf") => {
pdf_converter::convert_to_png(&file_path, &tmp_dir.path())
}
Expand Down

0 comments on commit 6c314e8

Please sign in to comment.