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)),