Scenario harness folder uses the long-name temp dir (#1404)

scenario::scratch_dir builds the harness folder under solidcraft_engine::io::vfs::temp_dir() (long names), so a short 8.3 TEMP on Windows no longer trips the short-name refusal before the scope checks the scenarios test. Fixes #1385.
This commit is contained in:
Lasse Lian authored and GitHub committed 2026-10-15 12:46:25 -04:00
1 parent c2ba3657f3
commit d4ab9545a1
1 file changed
+3 -2
+3 -2
View File
@@ -112,11 +112,12 @@ fn with_dir(v: Value, dir: &str) -> Value {
}
}
/// A fresh folder for one scenario's files.
/// A fresh folder for one scenario's files, under the temporary folder spelled with long names
/// (a short 8.3 `TEMP` would trip the short-name refusal before the scope checks the scenarios test).
fn scratch_dir() -> PathBuf {
use std::sync::atomic::{AtomicUsize, Ordering};
static N: AtomicUsize = AtomicUsize::new(0);
let d = std::env::temp_dir().join(format!("solidcraft-scenario-{}-{}", std::process::id(), N.fetch_add(1, Ordering::Relaxed)));
let d = solidcraft_engine::io::vfs::temp_dir().join(format!("solidcraft-scenario-{}-{}", std::process::id(), N.fetch_add(1, Ordering::Relaxed)));
let _ = std::fs::create_dir_all(&d);
d
}