From fe614f71fcdef6f193dd986f36af3cc591fbf7c4 Mon Sep 17 00:00:00 2001 From: ruki Date: Mon, 8 May 2017 21:56:04 +0800 Subject: ensure tmpdir exist --- xmake/core/base/os.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) 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 -- cgit v1.3.1