config: avoid watching and reloading for home dir changes

refs: #1697
refs: https://github.com/wez/wezterm/issues/1895
This commit is contained in:
Wez Furlong committed 2022-04-21 06:34:01 -07:00
1 parent f9c4855159
commit c85fce703d
1 file changed
+7 -1
+7 -1
View File
@@ -484,7 +484,13 @@ impl ConfigInner {
// Let's also watch the parent directory for folks that do
// things with symlinks:
if let Some(parent) = path.parent() {
watch_paths.push(parent.to_path_buf());
// But avoid watching the home dir itself, so that we
// don't keep reloading every time something in the
// home dir changes!
// <https://github.com/wez/wezterm/issues/1895>
if parent != &*HOME_DIR {
watch_paths.push(parent.to_path_buf());
}
}
watch_paths.push(path);
}