diff options
author | satotake <[email protected]> | 2022-09-21 15:01:54 +0000 |
---|---|---|
committer | Bjørn Erik Pedersen <[email protected]> | 2022-09-23 13:12:57 +0200 |
commit | 281554ee97eb243af097611aaf6bfec8940ad6d1 (patch) | |
tree | e7581707bac6026c78ecc77a23e378e2fc30e68e /resources/resource_factories/create/create.go | |
parent | f3560aa0e170f8bbc1e5ab41f1e54bd819da5cc3 (diff) | |
download | hugo-281554ee97eb243af097611aaf6bfec8940ad6d1.tar.gz hugo-281554ee97eb243af097611aaf6bfec8940ad6d1.zip |
hugofs: Fix glob case-sensitivity bug
On Linux, `hugofs.Glob` does not hit any directories which includes
uppercase letters. (This does not happen on macOS.)
Since `resources.GetMatch/Match` uses `Glob`,
```
{{ resources.GetMatch "Foo/bar.css" }}
```
this does not match `assets/Foo/bar.css` .
On the other hand, you can get it with
```
{{ resources.Get "Foo/bar.css" }}
```
Diffstat (limited to 'resources/resource_factories/create/create.go')
-rw-r--r-- | resources/resource_factories/create/create.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/resources/resource_factories/create/create.go b/resources/resource_factories/create/create.go index 075d25736..508c141f6 100644 --- a/resources/resource_factories/create/create.go +++ b/resources/resource_factories/create/create.go @@ -93,7 +93,7 @@ func (c *Client) GetMatch(pattern string) (resource.Resource, error) { } func (c *Client) match(name, pattern string, matchFunc func(r resource.Resource) bool, firstOnly bool) (resource.Resources, error) { - pattern = glob.NormalizePath(pattern) + pattern = glob.NormalizePathCaseSensitive(pattern) partitions := glob.FilterGlobParts(strings.Split(pattern, "/")) if len(partitions) == 0 { partitions = []string{resources.CACHE_OTHER} |