Skip to content

SolidCraft: an open-source parametric 3D CAD application built in pure Rust. Desktop, web, and automation through MCP.

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

Lasse Liand4ab9545a16b
diff --git a/crates/ui-egui/src/scenario.rs b/crates/ui-egui/src/scenario.rs
index 5a530c3ac8..798b4029dd 100644
--- a/crates/ui-egui/src/scenario.rs
+++ b/crates/ui-egui/src/scenario.rs
@@ -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
}