From 09f1362305641426c58099fbf0c38e238e056f52 Mon Sep 17 00:00:00 2001 From: Larpon Date: Wed, 5 Aug 2020 19:02:57 +0200 Subject: [PATCH] os: let temp_dir adhere to posix/fhs version 3.0 on linux and mac (#6069) --- vlib/os/os.v | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/vlib/os/os.v b/vlib/os/os.v index 9f8b939aad..cb37ba4498 100644 --- a/vlib/os/os.v +++ b/vlib/os/os.v @@ -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'