vendor: Update github.com/syncthing/notify (fixes #4885) (#4894)

This commit is contained in:
Simon Frei
2018-04-20 17:01:03 +02:00
committed by GitHub
parent 25bf406f0e
commit 3d02fcd473
6 changed files with 40 additions and 33 deletions

View File

@@ -23,6 +23,8 @@ import "fmt"
var defaultTree tree // lazy init
type DoNotWatchFn func(string) bool
func lazyInitDefaultTree() (err error) {
if defaultTree != nil {
// already initialized
@@ -96,7 +98,7 @@ func Watch(path string, c chan<- EventInfo, events ...Event) error {
// doNotWatch. Given a path as argument doNotWatch should return true if the
// file or directory should not be watched.
func WatchWithFilter(path string, c chan<- EventInfo,
doNotWatch func(string) bool, events ...Event) error {
doNotWatch DoNotWatchFn, events ...Event) error {
if err := lazyInitDefaultTree(); err != nil {
return err
}