diff --git a/src/files.rs b/src/files.rs index 11ad898..50d5c93 100644 --- a/src/files.rs +++ b/src/files.rs @@ -568,7 +568,14 @@ pub async fn list_photos( path.display() ) }); - let relative_str = relative.to_str().unwrap().to_string(); + // Normalize separators to '/' so downstream + // lookups (tags, EXIF, insights) that store + // rel_paths with forward slashes still match + // on Windows. + let relative_str = relative + .to_str() + .unwrap() + .replace('\\', "/"); if md.is_file() { files.push(relative_str); @@ -589,7 +596,7 @@ pub async fn list_photos( path.display() ) }); - files.push(relative.to_str().unwrap().to_string()); + files.push(relative.to_str().unwrap().replace('\\', "/")); } } }