Skip to content

A fast file manager for Windows and macOS that never freezes: tabs, dual panes, archives as folders, Quick Look-style previews. A File Explorer and Finder alternative written in Rust.

Test of items of several folders compares long paths (CI's 8.3 temp)

gelenmedyadc76688ea3d8
diff --git a/crates/rf-win/src/ctxmenu.rs b/crates/rf-win/src/ctxmenu.rs
index 92d59ef5..513052a7 100644
--- a/crates/rf-win/src/ctxmenu.rs
+++ b/crates/rf-win/src/ctxmenu.rs
@@ -1048,9 +1048,11 @@ mod items_of_several_folders {
got.push(std::path::PathBuf::from(String::from_utf16_lossy(&buf[..len])));
}
unsafe { ReleaseStgMedium(&mut medium) };
+ // (each side in its full long form: the temp folder can come as an 8.3 short path, `RUNNER~1`, on one side and long on the other)
+ let canon = |p: &std::path::Path| std::fs::canonicalize(p).unwrap_or_else(|_| p.to_path_buf()).to_string_lossy().to_lowercase();
+ let (got, want): (Vec<String>, Vec<String>) = (got.iter().map(|p| canon(p)).collect(), vec![canon(&a), canon(&b)]);
let _ = std::fs::remove_dir_all(&root);
- let canon = |p: &std::path::Path| p.to_string_lossy().to_lowercase();
- assert_eq!(got.iter().map(|p| canon(p)).collect::<Vec<_>>(), vec![canon(&a), canon(&b)], "{got:?}");
+ assert_eq!(got, want);
}
}