diff --git a/watch.go b/watch.go index bc90829..57bd609 100644 --- a/watch.go +++ b/watch.go @@ -36,7 +36,12 @@ func (fw *InotifyFileWatcher) BlockUntilExists() error { return err } defer w.RemoveWatch(filepath.Dir(fw.Filename)) - <-w.Event + for { + evt := <-w.Event + if evt.Name == fw.Filename { + break + } + } return nil }