From 1fde6281f19cb91611759326eadc27bd4a2b4256 Mon Sep 17 00:00:00 2001 From: Max Claus Nunes Date: Sun, 7 Aug 2022 10:47:30 -0300 Subject: [PATCH] Ignore go-tmp-unmask Closes https://github.com/maxcnunes/gaper/issues/13 --- watcher.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/watcher.go b/watcher.go index a711480..5ca3a8c 100644 --- a/watcher.go +++ b/watcher.go @@ -118,6 +118,11 @@ func (w *watcher) scanChange(watchPath string) (string, error) { err := filepath.Walk(watchPath, func(path string, info os.FileInfo, err error) error { if err != nil { + // Ignore attempt to acess go temporary unmask + if strings.Contains(err.Error(), "-go-tmp-umask") { + return filepath.SkipDir + } + return fmt.Errorf("couldn't walk to path \"%s\": %v", path, err) }