]> git.maquefel.me Git - brevno-suite/hugo/commit
hugofs: Fix glob case-sensitivity bug
authorsatotake <doublequotation@gmail.com>
Wed, 21 Sep 2022 15:01:54 +0000 (15:01 +0000)
committerBjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Fri, 23 Sep 2022 11:12:57 +0000 (13:12 +0200)
commit281554ee97eb243af097611aaf6bfec8940ad6d1
treee7581707bac6026c78ecc77a23e378e2fc30e68e
parentf3560aa0e170f8bbc1e5ab41f1e54bd819da5cc3
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" }}
```
hugofs/glob.go
hugofs/glob/glob.go
hugofs/glob_test.go
resources/resource_factories/create/create.go