浏览代码

Add clarifying comment

Sergio Rubio 5 月之前
父节点
当前提交
76a80ff034
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      internal/glance/config.go

+ 3 - 0
internal/glance/config.go

@@ -295,6 +295,9 @@ func configFilesWatcher(
 						}
 						time.Sleep(100 * time.Millisecond)
 					}
+					// fsnotify removes the file from the watch list on rename events,
+					// add it back.
+					// See https://github.com/fsnotify/fsnotify/issues/214
 					err := watcher.Add(mainFileAbsPath)
 					if err != nil {
 						onErr(fmt.Errorf("watching file:", err))