summaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorBjørn Erik Pedersen <[email protected]>2018-01-22 11:29:02 +0100
committerBjørn Erik Pedersen <[email protected]>2018-01-22 11:29:33 +0100
commit34a216fe6778815dd76be628b9148e85c2af07fe (patch)
treeeed665cea2bf16342fc0f5622d7f579ef30f246c
parentadee04f4b4e149c8cd46f94d1501ddc17faa135e (diff)
downloadhugo-34a216fe6778815dd76be628b9148e85c2af07fe.tar.gz
hugo-34a216fe6778815dd76be628b9148e85c2af07fe.zip
resource: Avoid some strings.ToLower in globbing
See #4301
-rw-r--r--Gopkg.lock2
-rw-r--r--resource/resource.go4
2 files changed, 2 insertions, 4 deletions
diff --git a/Gopkg.lock b/Gopkg.lock
index e7d14c5e3..182d8e555 100644
--- a/Gopkg.lock
+++ b/Gopkg.lock
@@ -381,6 +381,6 @@
[solve-meta]
analyzer-name = "dep"
analyzer-version = 1
- inputs-digest = "3bd32a09fb219b2cddf0e5a91110430a05bfd2d3a28215c69b8013ff2b6b89dc"
+ inputs-digest = "c80ffe69d34005d8d72a87cc491ce1d9c91272e4b7f8fbd22d4fda8973fa8556"
solver-name = "gps-cdcl"
solver-version = 1
diff --git a/resource/resource.go b/resource/resource.go
index a2128bdc7..b785cb2be 100644
--- a/resource/resource.go
+++ b/resource/resource.go
@@ -191,8 +191,6 @@ var (
)
func getGlob(pattern string) (glob.Glob, error) {
- pattern = strings.ToLower(pattern)
-
var g glob.Glob
globMu.RLock()
@@ -200,7 +198,7 @@ func getGlob(pattern string) (glob.Glob, error) {
globMu.RUnlock()
if !found {
var err error
- g, err = glob.Compile(pattern, '/')
+ g, err = glob.Compile(strings.ToLower(pattern), '/')
if err != nil {
return nil, err
}