os: let temp_dir adhere to posix/fhs version 3.0 on linux and mac (#6069)
parent
b22711ef33
commit
09f1362305
|
@ -1256,8 +1256,11 @@ pub fn temp_dir() string {
|
|||
}
|
||||
}
|
||||
}
|
||||
if path == '' {
|
||||
path = os.cache_dir()
|
||||
$if android {
|
||||
// TODO test+use '/data/local/tmp' on Android before using cache_dir()
|
||||
if path == '' {
|
||||
path = os.cache_dir()
|
||||
}
|
||||
}
|
||||
if path == '' {
|
||||
path = '/tmp'
|
||||
|
|
Loading…
Reference in New Issue