mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-25 22:00:58 +02:00
committed by
Bjørn Erik Pedersen
parent
b33bfd40be
commit
39df7724ad
@@ -18,9 +18,11 @@ import (
|
||||
"os"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"strings"
|
||||
|
||||
"github.com/spf13/hugo/hugofs"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
|
||||
"github.com/spf13/viper"
|
||||
|
||||
@@ -66,6 +68,11 @@ func (f *Filesystem) Files() []*File {
|
||||
func (f *Filesystem) add(name string, reader io.Reader) (err error) {
|
||||
var file *File
|
||||
|
||||
if runtime.GOOS == "darwin" {
|
||||
// When a file system is HFS+, its filepath is in NFD form.
|
||||
name = norm.NFC.String(name)
|
||||
}
|
||||
|
||||
file, err = NewFileFromAbs(f.Base, name, reader)
|
||||
|
||||
if err == nil {
|
||||
|
Reference in New Issue
Block a user