mirror of
https://github.com/leafo/moonscript.git
synced 2025-01-09 00:04:22 +00:00
Merge pull request #261 from ChickenNuggers/patch-1
bin/moonc: fixes #259 when not using inotify
This commit is contained in:
commit
be7e947eb4
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user