--- a/library/std/src/sys/pal/unix/os.rs +++ b/library/std/src/sys/pal/unix/os.rs @@ -680,7 +680,7 @@ pub fn temp_dir() -> PathBuf { crate::env::var_os("TMPDIR").map(PathBuf::from).unwrap_or_else(|| { if cfg!(target_os = "android") { - PathBuf::from("/data/local/tmp") + PathBuf::from("@TERMUX_PREFIX@/tmp") } else { PathBuf::from("/tmp") }