diff options
Diffstat (limited to 'hugofs/glob.go')
-rw-r--r-- | hugofs/glob.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/hugofs/glob.go b/hugofs/glob.go index e691cdc10..1b649a283 100644 --- a/hugofs/glob.go +++ b/hugofs/glob.go @@ -26,19 +26,20 @@ import ( // Glob walks the fs and passes all matches to the handle func. // The handle func can return true to signal a stop. func Glob(fs afero.Fs, pattern string, handle func(fi FileMetaInfo) (bool, error)) error { - pattern = glob.NormalizePathCaseSensitive(pattern) + pattern = glob.NormalizePathNoLower(pattern) if pattern == "" { return nil } + root := glob.ResolveRootDir(pattern) + pattern = strings.ToLower(pattern) - g, err := glob.GetFilenamesGlob(pattern) + g, err := glob.GetGlob(pattern) if err != nil { return err } hasSuperAsterisk := strings.Contains(pattern, "**") levels := strings.Count(pattern, "/") - root := glob.ResolveRootDir(pattern) // Signals that we're done. done := errors.New("done") |