From 8ca70525281d519f0e7d24e64248f055c4de07e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Wed, 25 May 2022 18:31:00 +0200 Subject: [PATCH] server: Skip watching dirs in ignoreFiles Fixes #9838 --- commands/hugo.go | 5 +++++ 1 file changed, 5 insertions(+) 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) } }