Skip to content

Commit

Permalink
Glob supports "/" separators even on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
bmatcuk committed Aug 11, 2018
1 parent b91dabe commit d8311f3
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 @@ -189,7 +189,7 @@ func doMatching(patternComponents, nameComponents []string) (matched bool, err e
// Note: this is meant as a drop-in replacement for filepath.Glob().
//
func Glob(pattern string) (matches []string, err error) {
patternComponents := splitPathOnSeparator(pattern, os.PathSeparator)
patternComponents := splitPathOnSeparator(filepath.FromSlash(pattern), '/')
if len(patternComponents) == 0 {
return nil, nil
}
Expand Down

0 comments on commit d8311f3

Please sign in to comment.