summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--core/src/xmake/os/mtime.c2
-rw-r--r--xmake/modules/core/project/depend.lua4
2 files changed, 2 insertions, 4 deletions
diff --git a/core/src/xmake/os/mtime.c b/core/src/xmake/os/mtime.c
index 1d79c9c74..24ac9e4d8 100644
--- a/core/src/xmake/os/mtime.c
+++ b/core/src/xmake/os/mtime.c
@@ -47,7 +47,5 @@ tb_int_t xm_os_mtime(lua_State* lua)
if (tb_file_info(path, &info))
lua_pushinteger(lua, (lua_Integer)info.mtime);
else lua_pushinteger(lua, 0);
-
- // ok
return 1;
}
diff --git a/xmake/modules/core/project/depend.lua b/xmake/modules/core/project/depend.lua
index 84a8b99d9..8863e2f2e 100644
--- a/xmake/modules/core/project/depend.lua
+++ b/xmake/modules/core/project/depend.lua
@@ -104,8 +104,8 @@ function is_changed(dependinfo, opt)
local mtime = files_mtime[file] or os.mtime(file)
files_mtime[file] = mtime
- -- source and header files have been changed?
- if mtime == nil or mtime > lastmtime then
+ -- source and header files have been changed or not exists?
+ if mtime == 0 or mtime > lastmtime then
return true
end
end