summaryrefslogtreecommitdiff
path: root/xmake
diff options
context:
space:
mode:
Diffstat (limited to 'xmake')
-rw-r--r--xmake/core/base/os.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua
index fff5c8408..aec706e55 100644
--- a/xmake/core/base/os.lua
+++ b/xmake/core/base/os.lua
@@ -559,6 +559,7 @@ end
-- we will do not change it if atime/mtime is zero
function os.touch(filepath, opt)
opt = opt or {}
+ opt.mtime = os.time()
if not os._touch(filepath, opt.atime or 0, opt.mtime or 0) then
return false, string.format("cannot touch %s, %s", filepath, os.strerror())
end