termux-packages/packages/rust/os-tmpdir.patch

13 lines
617 B
Diff
Raw Normal View History

diff -uNr rustc-1.57.0-src/library/std/src/sys/unix/os.rs rustc-1.57.0-src.mod/library/std/src/sys/unix/os.rs
--- rustc-1.57.0-src/library/std/src/sys/unix/os.rs 2021-11-29 20:27:11.000000000 +0100
+++ rustc-1.57.0-src.mod/library/std/src/sys/unix/os.rs 2021-12-04 09:04:53.000000000 +0100
@@ -570,7 +570,7 @@
2018-10-21 02:05:12 +02:00
pub fn temp_dir() -> PathBuf {
crate::env::var_os("TMPDIR").map(PathBuf::from).unwrap_or_else(|| {
2018-10-21 02:05:12 +02:00
if cfg!(target_os = "android") {
- PathBuf::from("/data/local/tmp")
+ PathBuf::from("@TERMUX_PREFIX@/tmp")
2018-10-21 02:05:12 +02:00
} else {
PathBuf::from("/tmp")
}