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 685a1af commit cf1b336
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 @@ -449,7 +449,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 cf1b336

Please sign in to comment.