From: Bjørn Erik Pedersen Date: Wed, 25 May 2022 16:31:00 +0000 (+0200) Subject: server: Skip watching dirs in ignoreFiles X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=8ca70525281d519f0e7d24e64248f055c4de07e6;p=brevno-suite%2Fhugo server: Skip watching dirs in ignoreFiles Fixes #9838 --- diff --git a/commands/hugo.go b/commands/hugo.go index 94111e92d..c61e64185 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -861,8 +861,13 @@ func (c *commandeer) newWatcher(pollIntervalStr string, dirList ...string) (*wat return nil, err } + spec := c.hugo().Deps.SourceSpec + for _, d := range dirList { if d != "" { + if spec.IgnoreFile(d) { + continue + } _ = watcher.Add(d) } }