mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-07 20:30:36 -05:00
hugolib: Fix livereload problem with files including NFC characters in MacOs
Fixes #8429
This commit is contained in:
parent
74f0777c5f
commit
d82cef5c53
1 changed files with 6 additions and 0 deletions
|
@ -24,12 +24,14 @@ import (
|
|||
"path"
|
||||
"path/filepath"
|
||||
"regexp"
|
||||
"runtime"
|
||||
"sort"
|
||||
"strconv"
|
||||
"strings"
|
||||
"time"
|
||||
|
||||
"github.com/gohugoio/hugo/common/types"
|
||||
"golang.org/x/text/unicode/norm"
|
||||
|
||||
"github.com/gohugoio/hugo/common/paths"
|
||||
|
||||
|
@ -950,6 +952,10 @@ func (s *Site) filterFileEvents(events []fsnotify.Event) []fsnotify.Event {
|
|||
continue
|
||||
}
|
||||
|
||||
if runtime.GOOS == "darwin" { // When a file system is HFS+, its filepath is in NFD form.
|
||||
ev.Name = norm.NFC.String(ev.Name)
|
||||
}
|
||||
|
||||
filtered = append(filtered, ev)
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue