From 41c70cef65f4f82e718924ae934dd6323d5b60ad Mon Sep 17 00:00:00 2001 From: ruki Date: Wed, 17 Aug 2022 23:22:46 +0800 Subject: improve os.touch --- xmake/core/base/os.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xmake/core/base/os.lua b/xmake/core/base/os.lua index fff5c8408..fdbc3edbf 100644 --- a/xmake/core/base/os.lua +++ b/xmake/core/base/os.lua @@ -559,7 +559,7 @@ end -- we will do not change it if atime/mtime is zero function os.touch(filepath, opt) opt = opt or {} - if not os._touch(filepath, opt.atime or 0, opt.mtime or 0) then + if os._touch and 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 return true -- cgit v1.3.1