commit 8ca70525281d519f0e7d24e64248f055c4de07e6
parent bb232a351ac4ceb488d06f45ef230e457be26f40
Author: Bjørn Erik Pedersen <bjorn.erik.pedersen@gmail.com>
Date: Wed, 25 May 2022 18:31:00 +0200
server: Skip watching dirs in ignoreFiles
Fixes #9838
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git 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)
}
}