os: let temp_dir adhere to posix/fhs version 3.0 on linux and mac (#6069)

pull/6074/head
Larpon 2020-08-05 19:02:57 +02:00 committed by GitHub
parent b22711ef33
commit 09f1362305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 2 deletions

View File

@ -1256,9 +1256,12 @@ pub fn temp_dir() string {
}
}
}
$if android {
// TODO test+use '/data/local/tmp' on Android before using cache_dir()
if path == '' {
path = os.cache_dir()
}
}
if path == '' {
path = '/tmp'
}