From e3cb8e6c7874d7dfe1d4d1c7f5c9765b681fb647 Mon Sep 17 00:00:00 2001 From: Anthony Fok Date: Thu, 10 Jan 2019 15:57:30 -0700 Subject: [PATCH] Add configFile(s) back to the watch list after RENAME event too Alleviates #5205 --- commands/hugo.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/commands/hugo.go b/commands/hugo.go index b94356838..3690c0ad5 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 {