backend: prefer watching Create event

This commit is contained in:
nemunaire 2017-11-22 02:39:34 +01:00 committed by Pierre-Olivier Mercier
parent 557b576da5
commit ddd1773777

View File

@ -116,7 +116,7 @@ func main() {
if err := watchsubdir(watcher, ev.Name); err != nil {
log.Println(err)
}
} else if ev.Op & fsnotify.Write == fsnotify.Write {
} else if ev.Op & fsnotify.Create == fsnotify.Create {
go treat(ev.Name)
}
case err := <-watcher.Errors: