Skip to content

Commit 6c422b0

Browse files
committed
should add watch at last
#1872
1 parent 4e56523 commit 6c422b0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

script/filewatch.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,13 +44,13 @@ function m.watch(path, recursive, filter)
4444
m._watchings[path].count = m._watchings[path].count + 1
4545
else
4646
local watch = fw.create()
47-
watch:add(path)
48-
log.debug('Watch add:', path)
4947
if recursive then
50-
watch:set_filter(filter)
51-
watch:set_follow_symlinks(true)
5248
watch:set_recursive(true)
49+
watch:set_follow_symlinks(true)
50+
watch:set_filter(filter)
5351
end
52+
log.debug('Watch add:', path)
53+
watch:add(path)
5454
m._watchings[path] = {
5555
count = 1,
5656
watch = watch,

0 commit comments

Comments
 (0)