diff --git a/filenotify/poller_test.go b/filenotify/poller_test.go index 1ad72e9..506fc48 100644 --- a/filenotify/poller_test.go +++ b/filenotify/poller_test.go @@ -64,14 +64,15 @@ func TestPollerEvent(t *testing.T) { default: } - if err := ioutil.WriteFile(f.Name(), []byte("hello"), 0644); err != nil { + if err := ioutil.WriteFile(f.Name(), []byte("hello"), 0600); err != nil { + // consider umask t.Fatal(err) } if err := assertEvent(w, fsnotify.Write); err != nil { t.Fatal(err) } - if err := os.Chmod(f.Name(), 600); err != nil { + if err := os.Chmod(f.Name(), 0644); err != nil { t.Fatal(err) } if err := assertEvent(w, fsnotify.Chmod); err != nil { diff --git a/refresh/watcher.go b/refresh/watcher.go index 7c20ea5..14e4293 100644 --- a/refresh/watcher.go +++ b/refresh/watcher.go @@ -39,7 +39,7 @@ func (w *Watcher) Start() { err := filepath.Walk(w.AppRoot, func(path string, info os.FileInfo, err error) error { if info == nil { w.cancelFunc() - return errors.New("nil directory!") + return errors.New("nil directory") } if info.IsDir() { if strings.HasPrefix(filepath.Base(path), "_") {