From 85a78806aa1b4707d1dbace9be592cf1ece91ab3 Mon Sep 17 00:00:00 2001 From: Bob Matcuk Date: Sat, 11 Aug 2018 06:50:57 -0700 Subject: [PATCH] fix Glob / support on Windows --- doublestar.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doublestar.go b/doublestar.go index c76f42c..ceab4e3 100644 --- a/doublestar.go +++ b/doublestar.go @@ -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(filepath.FromSlash(pattern), '/') + patternComponents := splitPathOnSeparator(filepath.ToSlash(pattern), '/') if len(patternComponents) == 0 { return nil, nil }