From 6c314e8f2922c1c023958c45be0b053b633e7d0c Mon Sep 17 00:00:00 2001 From: Mike Schmid Date: Tue, 30 Jul 2024 09:45:52 +0200 Subject: [PATCH] fix: make file extension check case-insensitive (#22) Co-authored-by: mike --- src/lib.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/lib.rs b/src/lib.rs index 1d240c5..9cbd39e 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -16,7 +16,8 @@ use tempfile::tempdir; pub fn get_qr_bill_data(file_path: String, fail_on_error: bool) -> Vec { 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()) }