Error on failure of Watcher.Add

pull/977/head
Daniel Wagner-Hall 9 years ago
parent 6ac519d9dc
commit c29aef362e

@ -80,7 +80,9 @@ func makeWalker(w *fsnotify.Watcher) filepath.WalkFunc {
if err != nil { if err != nil {
log.Fatalf("Error walking: %v", err) log.Fatalf("Error walking: %v", err)
} }
w.Add(path) if err := w.Add(path); err != nil {
log.Fatalf("Failed to add watch: %v", err)
}
return nil return nil
} }
} }

Loading…
Cancel
Save