projects
/
brevno-suite
/
hugo
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74f0777
)
hugolib: Fix livereload problem with files including NFC characters in MacOs
author
roointan
<37560641+roointan@users.noreply.github.com>
Sat, 8 Jan 2022 10:35:30 +0000
(14:05 +0330)
committer
GitHub
<noreply@github.com>
Sat, 8 Jan 2022 10:35:30 +0000
(11:35 +0100)
Fixes #8429
hugolib/site.go
patch
|
blob
|
history
diff --git
a/hugolib/site.go
b/hugolib/site.go
index bde8a2199a574e0e776d850609e87f18a616b110..624630d8019ecc430ca17fd21dbf4839440fc9c2 100644
(file)
--- a/
hugolib/site.go
+++ b/
hugolib/site.go
@@
-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)
}