diff options
Diffstat (limited to 'src/io/fs/glob.go')
-rw-r--r-- | src/io/fs/glob.go | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/io/fs/glob.go b/src/io/fs/glob.go index 549f217542..45d9cb61b9 100644 --- a/src/io/fs/glob.go +++ b/src/io/fs/glob.go @@ -6,7 +6,6 @@ package fs import ( "path" - "runtime" ) // A GlobFS is a file system with a Glob method. @@ -111,8 +110,8 @@ func glob(fs FS, dir, pattern string, matches []string) (m []string, e error) { // recognized by path.Match. func hasMeta(path string) bool { for i := 0; i < len(path); i++ { - c := path[i] - if c == '*' || c == '?' || c == '[' || runtime.GOOS == "windows" && c == '\\' { + switch path[i] { + case '*', '?', '[', '\\': return true } } |