Improve Exif Query path handling

This commit is contained in:
Cameron
2026-01-08 13:41:08 -05:00
parent cd66521c17
commit 61e10f7678

View File

@@ -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::<ImageExif>(connection.deref_mut())
{
Ok(exif) => Ok(Some(exif)),