shithub: hugo

Download patch

ref: e3cb8e6c7874d7dfe1d4d1c7f5c9765b681fb647
parent: 55251aa89099358c040d38f3af48e3699d67bab2
author: Anthony Fok <[email protected]>
date: Thu Jan 10 10:57:30 EST 2019

Add configFile(s) back to the watch list after RENAME event too

Alleviates #5205

--- a/commands/hugo.go
+++ b/commands/hugo.go
@@ -764,7 +764,7 @@
 			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 {