]> go.fuhry.dev Git - fsnotify.git/commitdiff
BSD: error reporting
authorChris Howey <chris@howey.me>
Mon, 17 Oct 2011 20:47:24 +0000 (13:47 -0700)
committerChris Howey <chris@howey.me>
Mon, 17 Oct 2011 20:47:24 +0000 (13:47 -0700)
fsnotify_bsd.go

index a221a5849b5dfb1d71c6a928b2aa6045b0757fcd..3375c9b6354c06ce1ddc030cc8df0b107ce3636b 100644 (file)
@@ -238,7 +238,10 @@ func (w *Watcher) readEvents() {
 // create event for files created in a watched directory.
 func (w *Watcher) sendDirectoryChangeEvents(dirPath string) {
        // Get all files
-       files, _ := ioutil.ReadDir(dirPath)
+       files, err := ioutil.ReadDir(dirPath)
+       if err != nil {
+               w.Error <- err
+       }
 
        // Search for new files
        for _, fileInfo := range files {