server: Skip watching dirs in ignoreFiles

Fixes #9838
This commit is contained in:
Bjørn Erik Pedersen 2022-05-25 18:31:00 +02:00
parent bb232a351a
commit 8ca7052528
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -861,8 +861,13 @@ func (c *commandeer) newWatcher(pollIntervalStr string, dirList ...string) (*wat
return nil, err return nil, err
} }
spec := c.hugo().Deps.SourceSpec
for _, d := range dirList { for _, d := range dirList {
if d != "" { if d != "" {
if spec.IgnoreFile(d) {
continue
}
_ = watcher.Add(d) _ = watcher.Add(d)
} }
} }