inotify: Also treat the first WRITE event
This commit is contained in:
parent
a2d2457811
commit
b3e221a15b
@ -163,6 +163,7 @@ loop:
|
|||||||
} else if err == nil && ev.Op&fsnotify.Write == fsnotify.Write {
|
} else if err == nil && ev.Op&fsnotify.Write == fsnotify.Write {
|
||||||
log.Println("FSNOTIFY WRITE SEEN. Prefer looking at them, as it appears files are not atomically moved.")
|
log.Println("FSNOTIFY WRITE SEEN. Prefer looking at them, as it appears files are not atomically moved.")
|
||||||
watchedNotify = fsnotify.Write
|
watchedNotify = fsnotify.Write
|
||||||
|
go treat(ev.Name)
|
||||||
} else if err == nil && *debugINotify {
|
} else if err == nil && *debugINotify {
|
||||||
log.Println("Skipped event:", ev, "for", ev.Name)
|
log.Println("Skipped event:", ev, "for", ev.Name)
|
||||||
}
|
}
|
||||||
|
@ -123,6 +123,7 @@ func main() {
|
|||||||
} else if err == nil && ev.Op&fsnotify.Write == fsnotify.Write {
|
} else if err == nil && ev.Op&fsnotify.Write == fsnotify.Write {
|
||||||
log.Println("FSNOTIFY WRITE SEEN. Prefer looking at them, as it appears files are not atomically moved.")
|
log.Println("FSNOTIFY WRITE SEEN. Prefer looking at them, as it appears files are not atomically moved.")
|
||||||
watchedNotify = fsnotify.Write
|
watchedNotify = fsnotify.Write
|
||||||
|
l.treat(ev.Name)
|
||||||
} else if *debugINotify {
|
} else if *debugINotify {
|
||||||
log.Println("Skipped event:", ev, "for", ev.Name)
|
log.Println("Skipped event:", ev, "for", ev.Name)
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user