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

v.util: make get_vtmp_folder() return /tmp/v_{uid} by default (see https://github.com/vlang/v/discussions/11796)

This commit is contained in:
Delyan Angelov 2021-11-09 08:25:19 +02:00
parent 08667c5645
commit 3f841edec1
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED

View File

@ -483,7 +483,8 @@ pub fn get_vtmp_folder() string {
if vtmp.len > 0 {
return vtmp
}
vtmp = os.join_path(os.temp_dir(), 'v')
uid := os.getuid()
vtmp = os.join_path(os.temp_dir(), 'v_$uid')
if !os.exists(vtmp) || !os.is_dir(vtmp) {
os.mkdir_all(vtmp) or { panic(err) }
}