Ignore go-tmp-unmask

Closes https://github.com/maxcnunes/gaper/issues/13
This commit is contained in:
Max Claus Nunes 2022-08-07 10:47:30 -03:00
parent 95fc7d2127
commit 1fde6281f1
1 changed files with 5 additions and 0 deletions

View File

@ -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)
}