Skip to content

Don't rewrite it in Rust. Rewrite the 5% that's slow: profile your app, port the hot functions with your coding agent, prove they behave the same. Python, JS/TS, Ruby, Java, Kotlin, Go, PHP, C/C++, C#, R.

python: canonicalize temp_dir on non-Windows in pure-call scan test

RRFZ6ed37feb9278
diff --git a/src/python.rs b/src/python.rs
index 780d763..f167ec4 100644
--- a/src/python.rs
+++ b/src/python.rs
@@ -1075,7 +1075,9 @@ sys.exit(1 if fails else 0)
eprintln!("no python on PATH, skipping");
return;
};
- let dir = std::env::temp_dir().join(format!("fa-pure-direct-{}", std::process::id()));
+ let tmp = std::env::temp_dir();
+ let tmp = if cfg!(windows) { tmp } else { tmp.canonicalize().unwrap() };
+ let dir = tmp.join(format!("fa-pure-direct-{}", std::process::id()));
let _ = fs::remove_dir_all(&dir);
fs::create_dir_all(&dir).unwrap();
fs::write(