Canonicalize the config watching path (#672)

This should resolve an issue where config behind a symlink was not being
properly reloaded when edited.
This commit is contained in:
Joe Wilm authored and GitHub committed 2017-07-19 12:26:45 -07:00
1 parent 94849c4f2a
commit c8e4f366e7
1 file changed
+3 -2
+3 -2
View File
@@ -1410,9 +1410,10 @@ impl Monitor {
_thread: ::util::thread::spawn_named("config watcher", move || {
let (tx, rx) = mpsc::channel();
let mut watcher = FileWatcher::new(tx).unwrap();
watcher.watch(&path).expect("watch alacritty yml");
let config_path = ::std::fs::canonicalize(path)
.expect("canonicalize config path");
let config_path = path.as_path();
watcher.watch(&config_path).expect("watch alacritty yml");
loop {
let event = rx.recv().expect("watcher event");