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

Alleviates #5205
This commit is contained in:
Anthony Fok 2019-01-10 15:57:30 -07:00
parent 55251aa890
commit e3cb8e6c78
No known key found for this signature in database
GPG key ID: EA2500B412C59ACF

View file

@ -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 {