diff options
| -rw-r--r-- | xmake/core/base/os.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
