mirror of
https://github.com/alacritty/alacritty.git
synced 2024-11-18 13:55:23 -05:00
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:
parent
94849c4f2a
commit
c8e4f366e7
1 changed files with 3 additions and 2 deletions
|
@ -1410,9 +1410,10 @@ impl Monitor {
|
||||||
_thread: ::util::thread::spawn_named("config watcher", move || {
|
_thread: ::util::thread::spawn_named("config watcher", move || {
|
||||||
let (tx, rx) = mpsc::channel();
|
let (tx, rx) = mpsc::channel();
|
||||||
let mut watcher = FileWatcher::new(tx).unwrap();
|
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 {
|
loop {
|
||||||
let event = rx.recv().expect("watcher event");
|
let event = rx.recv().expect("watcher event");
|
||||||
|
|
Loading…
Reference in a new issue