mirror of
https://github.com/gohugoio/hugo.git
synced 2025-08-20 21:31:32 +02:00
Revert "hugolib: Fix live-reload regression for add/removal of dirs"
Never mind. The "adding dir" scenario didn't work anyway, so that will need another fix.
This reverts commit 49a104309d
.
Closes ##3325
This commit is contained in:
@@ -753,6 +753,9 @@ func (s *Site) reProcess(events []fsnotify.Event) (whatChanged, error) {
|
||||
go pageConverter(pageChan, convertResults, wg2)
|
||||
}
|
||||
|
||||
sp := source.NewSourceSpec(s.Cfg, s.Fs)
|
||||
fs := sp.NewFilesystem("")
|
||||
|
||||
for _, ev := range sourceChanged {
|
||||
// The incrementalReadCollator below will also make changes to the site's pages,
|
||||
// so we do this first to prevent races.
|
||||
@@ -775,6 +778,15 @@ func (s *Site) reProcess(events []fsnotify.Event) (whatChanged, error) {
|
||||
}
|
||||
}
|
||||
|
||||
// ignore files shouldn't be proceed
|
||||
if fi, err := s.Fs.Source.Stat(ev.Name); err != nil {
|
||||
continue
|
||||
} else {
|
||||
if ok, err := fs.ShouldRead(ev.Name, fi); err != nil || !ok {
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
sourceReallyChanged = append(sourceReallyChanged, ev)
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user