From d4ab9545a16b123f51be45d2b465c08d5817da33 Mon Sep 17 00:00:00 2001 From: Lasse Lian Date: Thu, 15 Oct 2026 18:46:25 +0200 Subject: [PATCH] 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. --- crates/ui-egui/src/scenario.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/crates/ui-egui/src/scenario.rs b/crates/ui-egui/src/scenario.rs index 5a530c3a..798b4029 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 }