address review: clear stale export test dir before use

This commit is contained in:
Dylan M. Taylor
2026-11-03 12:59:15 +00:00
parent 202c4a1e2b
commit 5d12c8a7d7
+2
View File
@@ -667,6 +667,8 @@ fn save_frame_to_png_writes_behind_the_file_gate() {
#[test]
fn export_commands_run_directly_by_a_script_respect_the_file_gate() {
let dir = std::env::temp_dir().join(format!("ec-direct-export-{}", std::process::id()));
// A leftover dir from an interrupted run (same pid) must not feed stale absence checks.
let _ = std::fs::remove_dir_all(&dir);
std::fs::create_dir_all(&dir).unwrap();
let png = dir.join("frame.png");
let tpl = dir.join("card.ectemplate");