diff options
| -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 |
