tweak inotify

This commit is contained in:
leaf corcoran 2012-02-29 19:32:10 -08:00
parent 9d11356d7e
commit 97d8bc2e66

View File

@ -294,9 +294,9 @@ function create_watcher(files)
print(("%s with inotify [%s]"):format(msg, plural(#dirs, "dir"))) print(("%s with inotify [%s]"):format(msg, plural(#dirs, "dir")))
local wd_table = {} local wd_table = {}
local handle = inotify:init() local handle = inotify.init()
for _, dir in ipairs(dirs) do for _, dir in ipairs(dirs) do
local wd = handle:addwatch(dir, inotify.IN_MODIFY) local wd = handle:addwatch(dir, inotify.IN_CLOSE_WRITE)
wd_table[wd] = dir wd_table[wd] = dir
end end