fix: the server's own folders under a short-named temp path are expanded, not refused (#1055)
On Windows the temporary folder often has an 8.3 short name, which the path scope refuses. vfs::long_names spells folders SolidCraft derives from the environment with long names, and the MCP scratch folder and the recovery folder use it, so screenshot without a path and the recovery commands work there again.
This commit is contained in:
1 parent
cf93869c4d
commit
08b6a8fe0f
10 files changed
+165
-16
No files matched your search
@@ -814,7 +814,7 @@ mod tests {
|
||||
#[test]
|
||||
fn engine_batch_stays_inside_allow_paths() {
|
||||
let mut h = crate::scenario::Harness::new();
|
||||
let base = std::env::temp_dir().join(format!("solidcraft-batch-scope-{}", std::process::id()));
|
||||
let base = vfs::temp_dir().join(format!("solidcraft-batch-scope-{}", std::process::id()));
|
||||
let (root, out) = (base.join("root"), base.join("out"));
|
||||
std::fs::create_dir_all(&root).unwrap();
|
||||
std::fs::create_dir_all(&out).unwrap();
|
||||
@@ -859,7 +859,7 @@ mod tests {
|
||||
let mut s = Session::default();
|
||||
s.execute("solid.box", &json!({"length": 10, "width": 10, "height": 10})).unwrap();
|
||||
let mut app = SolveApp::new(s, Services::default());
|
||||
let base = std::env::temp_dir().join(format!("solidcraft-control-scope-{}", std::process::id()));
|
||||
let base = vfs::temp_dir().join(format!("solidcraft-control-scope-{}", std::process::id()));
|
||||
let (root, out) = (base.join("root"), base.join("out"));
|
||||
std::fs::create_dir_all(&root).unwrap();
|
||||
std::fs::create_dir_all(&out).unwrap();
|
||||
|
||||
Reference in new issue
Block a user