Skip to content

Commit

Permalink
🐛 don't throw away results if Readdir fails
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatcuk committed Aug 15, 2020
1 parent bcc22aa commit 5cf9061
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion doublestar.go
Original file line number Diff line number Diff line change
Expand Up @@ -442,7 +442,7 @@ func doGlob(vos OS, basedir, pattern string, matches []string) (m []string, e er

files, err := dir.Readdir(-1)
if err != nil {
return nil, err
return
}
sort.Slice(files, func(i, j int) bool { return files[i].Name() < files[j].Name() })

Expand Down

0 comments on commit 5cf9061

Please sign in to comment.