vendor: Update github.com/syncthing/notify (fixes #4854) (#5032)

This commit is contained in:
Simon Frei
2018-06-26 10:13:39 +02:00
committed by Jakob Borg
parent 7b0d8c2e77
commit 406b394704
8 changed files with 93 additions and 108 deletions

View File

@@ -90,6 +90,10 @@ func gostream(_, info uintptr, n C.size_t, paths, flags, ids uintptr) {
if n == 0 {
return
}
fn := streamFuncs.get(info)
if fn == nil {
return
}
ev := make([]FSEvent, 0, int(n))
for i := uintptr(0); i < uintptr(n); i++ {
switch flags := *(*uint32)(unsafe.Pointer((flags + i*offflag))); {
@@ -104,7 +108,7 @@ func gostream(_, info uintptr, n C.size_t, paths, flags, ids uintptr) {
}
}
streamFuncs.get(info)(ev)
fn(ev)
}
// StreamFunc is a callback called when stream receives file events.