1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
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

View File

@ -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'