v.util: make get_vtmp_folder() return `/tmp/v_{uid}` by default (see https://github.com/vlang/v/discussions/11796)
parent
08667c5645
commit
3f841edec1
|
@ -483,7 +483,8 @@ pub fn get_vtmp_folder() string {
|
||||||
if vtmp.len > 0 {
|
if vtmp.len > 0 {
|
||||||
return vtmp
|
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) {
|
if !os.exists(vtmp) || !os.is_dir(vtmp) {
|
||||||
os.mkdir_all(vtmp) or { panic(err) }
|
os.mkdir_all(vtmp) or { panic(err) }
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue