backend: prefer watching Create event
This commit is contained in:
parent
557b576da5
commit
ddd1773777
1 changed files with 1 additions and 1 deletions
|
@ -116,7 +116,7 @@ func main() {
|
||||||
if err := watchsubdir(watcher, ev.Name); err != nil {
|
if err := watchsubdir(watcher, ev.Name); err != nil {
|
||||||
log.Println(err)
|
log.Println(err)
|
||||||
}
|
}
|
||||||
} else if ev.Op & fsnotify.Write == fsnotify.Write {
|
} else if ev.Op & fsnotify.Create == fsnotify.Create {
|
||||||
go treat(ev.Name)
|
go treat(ev.Name)
|
||||||
}
|
}
|
||||||
case err := <-watcher.Errors:
|
case err := <-watcher.Errors:
|
||||||
|
|
Reference in a new issue