Skip to content

Commit

Permalink
[fix] optimize fs.Walk error output
Browse files Browse the repository at this point in the history
  • Loading branch information
trheyi committed Oct 28, 2023
1 parent 1ae7fce commit f3886c7
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 f3886c7

Please sign in to comment.