Skip to content

Commit

Permalink
Merge pull request #162 from trheyi/main
Browse files Browse the repository at this point in the history
[fix] optimize fs.Walk error output
  • Loading branch information
trheyi authored Oct 28, 2023
2 parents b17cd39 + f3886c7 commit 07e40a1
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions fs/system/system.go
Original file line number Diff line number Diff line change
Expand Up @@ -454,6 +454,10 @@ func (f *File) Walk(root string, handler func(root, file string, isdir bool) err
}

err = handler(root, name, isdir)
if filepath.SkipDir == err {
return filepath.SkipDir
}

if err != nil {
log.Error("[fs.Walk] %s %s", filename, err.Error())
return err
Expand Down

0 comments on commit 07e40a1

Please sign in to comment.