From: Anthony Fok Date: Thu, 10 Jan 2019 22:57:30 +0000 (-0700) Subject: Add configFile(s) back to the watch list after RENAME event too X-Git-Tag: v0.54.0~22 X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=e3cb8e6c7874d7dfe1d4d1c7f5c9765b681fb647;p=brevno-suite%2Fhugo Add configFile(s) back to the watch list after RENAME event too Alleviates #5205 --- diff --git a/commands/hugo.go b/commands/hugo.go index b9435683..3690c0ad 100644 --- a/commands/hugo.go +++ b/commands/hugo.go @@ -764,7 +764,7 @@ func (c *commandeer) handleEvents(watcher *watcher.Batcher, if ev.Op&fsnotify.Chmod == fsnotify.Chmod { continue } - if ev.Op&fsnotify.Remove == fsnotify.Remove { + if ev.Op&fsnotify.Remove == fsnotify.Remove || ev.Op&fsnotify.Rename == fsnotify.Rename { for _, configFile := range c.configFiles { counter := 0 for watcher.Add(configFile) != nil {