Skip to content

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

Three tests pass on Windows with an 8.3 TEMP path (#8968)

MATHEUS PINHEIRO RAPOSO70d39bb4f315
diff --git a/crates/engine/src/cmd/render/settings_tests.rs b/crates/engine/src/cmd/render/settings_tests.rs
index ea0178f0de..ee567667da 100644
--- a/crates/engine/src/cmd/render/settings_tests.rs
+++ b/crates/engine/src/cmd/render/settings_tests.rs
@@ -625,7 +625,7 @@ fn embedded_hdr_capture_rejects_parameters_scope_and_cpu_primaries_without_mutat
assert_eq!(state, (s.revision, s.undo.len(), s.redo.len()));
}
let nonce = std::time::SystemTime::now().duration_since(std::time::UNIX_EPOCH).unwrap().as_nanos();
- let dir = std::env::temp_dir().join(format!("solidcraft-hdr-scope-{}-{nonce}", std::process::id()));
+ let dir = solidcraft_io::vfs::temp_dir().join(format!("solidcraft-hdr-scope-{}-{nonce}", std::process::id()));
std::fs::create_dir(&dir).unwrap();
let allowed = dir.join("allowed");
std::fs::create_dir(&allowed).unwrap();
diff --git a/crates/ui-egui/src/agent_chat/tests.rs b/crates/ui-egui/src/agent_chat/tests.rs
index ee177a3aae..56828778ec 100644
--- a/crates/ui-egui/src/agent_chat/tests.rs
+++ b/crates/ui-egui/src/agent_chat/tests.rs
@@ -214,7 +214,7 @@ fn a_messages_changes_undo_as_one_step() {
#[test]
fn file_actions_wait_for_the_user() {
let (mut app, tx) = app_in_a_turn();
- let dir = std::env::temp_dir().join(format!("sc-agent-chat-approve-{}", std::process::id()));
+ let dir = solidcraft_engine::io::vfs::temp_dir().join(format!("sc-agent-chat-approve-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("a.solidcraft");
let save = json!({"command": "file.save", "params": {"path": path.to_string_lossy()}, "allow_paths": [dir.to_string_lossy()]});
@@ -466,7 +466,7 @@ fn permission_modes_decide_what_asks() {
decline_all(&mut app, "test");
// Allow everything, set for this agent only.
app.preferences.agent_permissions.insert("codex".into(), agents::Mode::All);
- let dir = std::env::temp_dir().join(format!("sc-agent-chat-all-{}", std::process::id()));
+ let dir = solidcraft_engine::io::vfs::temp_dir().join(format!("sc-agent-chat-all-{}", std::process::id()));
std::fs::create_dir_all(&dir).unwrap();
let path = dir.join("b.solidcraft");
let save = ask(