From 61e10f76784be8acd8ae71ff90a62f97b61863c8 Mon Sep 17 00:00:00 2001 From: Cameron Date: Thu, 8 Jan 2026 13:41:08 -0500 Subject: [PATCH] Improve Exif Query path handling --- src/database/mod.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/database/mod.rs b/src/database/mod.rs index 8e4f52d..cec38bb 100644 --- a/src/database/mod.rs +++ b/src/database/mod.rs @@ -356,8 +356,13 @@ impl ExifDao for SqliteExifDao { let mut connection = self.connection.lock().expect("Unable to get ExifDao"); + // Try both normalized (forward slash) and Windows (backslash) paths + // since database may contain either format + let normalized = path.replace('\\', "/"); + let windows_path = path.replace('/', "\\"); + match image_exif - .filter(file_path.eq(path)) + .filter(file_path.eq(&normalized).or(file_path.eq(&windows_path))) .first::(connection.deref_mut()) { Ok(exif) => Ok(Some(exif)),