diff options
| author | TitanSnow <[email protected]> | 2017-05-22 07:53:24 +0800 |
|---|---|---|
| committer | TitanSnow <[email protected]> | 2017-05-22 07:53:24 +0800 |
| commit | 8c19b03d8e54adc58ffccfb0e3c8db89b38d1a20 (patch) | |
| tree | dde5177d3a12a3d85e9c5802aadc9ba15c95e1db | |
| parent | 24cf9ef118cb14176b7f750e71db92a8c599823a (diff) | |
use euid as tmpdir suffix
| -rw-r--r-- | xmake/core/base/os.lua | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index a607e1214..8bb67e1db 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -422,13 +422,10 @@ end -- get the temporary directory function os.tmpdir() - -- attempt get user name - os._USER = os._USER or os.getenv("USER") - -- get a temporary directory for each user local tmpdir = os._tmpdir() - if os._USER and #os._USER > 0 then - tmpdir = path.join(tmpdir, ".xmake_" .. os._USER) + if os.uid then + tmpdir = path.join(tmpdir, ".xmake_" .. os.uid().euid) else tmpdir = path.join(tmpdir, ".xmake") end |
