diff options
| author | ruki <[email protected]> | 2016-07-14 07:59:30 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2016-07-14 07:59:30 +0800 |
| commit | ecac7f17ffd44e6fdf59538b640366bb8a77ae33 (patch) | |
| tree | 761f07238587fec10dbab0c647a856bc06e695aa /xmake/core/base/os.lua | |
| parent | 0775265b292057d7591f26ba81117b032ddbb165 (diff) | |
modify os.tmpdir
Diffstat (limited to 'xmake/core/base/os.lua')
| -rw-r--r-- | xmake/core/base/os.lua | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index cf662aab3..e857235d2 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -29,6 +29,9 @@ local path = require("base/path") local utils = require("base/utils") local string = require("base/string") +-- save original tmpdir +os._tmpdir = os._tmpdir or os.tmpdir + -- match files or directories -- -- @param pattern the search pattern @@ -245,6 +248,11 @@ function os.cd(dir) return true end +-- get the temporary directory +function os.tmpdir() + return path.join(os._tmpdir(), ".xmake") +end + -- generate the temporary file path function os.tmpfile() |
