Merge pull request #261 from ChickenNuggers/patch-1

bin/moonc: fixes #259 when not using inotify
This commit is contained in:
leaf 2016-04-13 18:52:36 -07:00
commit be7e947eb4

View File

@ -247,8 +247,10 @@ local function create_watcher(files)
for _, tuple in ipairs(files) do
local file = tuple[1]
local time = lfs.attributes(file, "modification")
if not mod_time[file] then
mod_time[file] = time
if not time then
mod_time[file] = nil -- file doesn't exist
elseif not mod_time[file] then
mod_time[file] = time -- new file created
else
if time ~= mod_time[file] then
if time > mod_time[file] then