From ecac7f17ffd44e6fdf59538b640366bb8a77ae33 Mon Sep 17 00:00:00 2001 From: ruki Date: Thu, 14 Jul 2016 07:59:30 +0800 Subject: modify os.tmpdir --- xmake/core/base/os.lua | 8 ++++++++ 1 file changed, 8 insertions(+) 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() -- cgit v1.3.1