diff options
| author | ruki <[email protected]> | 2017-05-08 21:56:04 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2017-05-08 21:56:46 +0800 |
| commit | fe614f71fcdef6f193dd986f36af3cc591fbf7c4 (patch) | |
| tree | 9544b46b86612df1e2e19b76d978e136e6ea5473 | |
| parent | cd28c287fbbcc4901a864623d6c1ef92f1487234 (diff) | |
ensure tmpdir exist
| -rw-r--r-- | xmake/core/base/os.lua | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index 5fb51b194..b5e397ed8 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -409,7 +409,13 @@ end -- get the temporary directory function os.tmpdir() - return path.join(os._tmpdir(), ".xmake") + + -- generate and get a temporary directory + local tmpdir = path.join(os._tmpdir(), ".xmake") + if not os.isdir(tmpdir) then + os.mkdir(tmpdir) + end + return tmpdir end -- generate the temporary file path |
