also listen for moved_to

This commit is contained in:
leaf corcoran 2014-01-04 15:41:20 -08:00
parent 682fef60e9
commit d3f0a455e7

View File

@ -314,7 +314,7 @@ function create_watcher(files)
local wd_table = {}
local handle = inotify.init()
for _, dir in ipairs(dirs) do
local wd = handle:addwatch(dir, inotify.IN_CLOSE_WRITE)
local wd = handle:addwatch(dir, inotify.IN_CLOSE_WRITE, inotify.IN_MOVED_TO)
wd_table[wd] = dir
end