From 109e4dabd320a828840ab3cc88b0ed0739ef0bca Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 16 Oct 2026 07:25:39 +0000 Subject: [PATCH] Windows: compare exported paths as paths in the same-folder export test same_folder_as_original_exports_next_to_each_photo compared path strings. The export joins the subfolder with '/', so on Windows it reports C:\...\A/Exports/IMG_1.jpg (a valid path) while the test expected C:\...\A\Exports/IMG_1.jpg. Found by running the tests on windows-latest (gap 9). Test-only change. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01AbegtYaPuwqZ81pGfELsFK --- crates/engine/src/tests_export.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/engine/src/tests_export.rs b/crates/engine/src/tests_export.rs index 2f1a05116..e01e7fbd5 100644 --- a/crates/engine/src/tests_export.rs +++ b/crates/engine/src/tests_export.rs @@ -991,8 +991,9 @@ fn same_folder_as_original_exports_next_to_each_photo() { let exists = |p: &str| std::path::Path::new(p).exists(); let files = crate::export::export_batch(&mut s, &ids, &o, &to, &mut crate::export::write_file, &exists).unwrap(); let written: Vec<&str> = files.iter().map(|f| f["path"].as_str().unwrap()).collect(); - let mut want = vec![a.join("Exports/IMG_1.jpg").to_string_lossy().to_string(), b.join("Exports/IMG_1.jpg").to_string_lossy().to_string()]; - let mut got: Vec = written.iter().map(|p| p.to_string()).collect(); + // compared as paths: on Windows the export joins the subfolder with `/`, which `Path` treats as `\` + let mut want = vec![a.join("Exports").join("IMG_1.jpg"), b.join("Exports").join("IMG_1.jpg")]; + let mut got: Vec = written.iter().map(std::path::PathBuf::from).collect(); want.sort(); got.sort(); assert_eq!(got, want);