mirror of
https://github.com/alacritty/alacritty.git
synced 2025-04-14 17:53:03 -04:00
Fix config reloading
Must have been broken when upgrading notify-rs
This commit is contained in:
parent
1cf9a179bc
commit
d3151dfbf9
1 changed files with 8 additions and 4 deletions
|
@ -1454,12 +1454,16 @@ impl Monitor {
|
|||
let config_path = ::std::fs::canonicalize(path)
|
||||
.expect("canonicalize config path");
|
||||
|
||||
watcher.watch(&config_path, RecursiveMode::NonRecursive).expect("watch alacritty yml");
|
||||
// Get directory of config
|
||||
let mut parent = config_path.clone();
|
||||
parent.pop();
|
||||
|
||||
// Watch directory
|
||||
watcher.watch(&parent, RecursiveMode::NonRecursive)
|
||||
.expect("watch alacritty.yml dir");
|
||||
|
||||
loop {
|
||||
let event = rx.recv().expect("watcher event");
|
||||
|
||||
match event {
|
||||
match rx.recv().expect("watcher event") {
|
||||
DebouncedEvent::Rename(_, _) => continue,
|
||||
DebouncedEvent::Write(path) | DebouncedEvent::Create(path)
|
||||
| DebouncedEvent::Chmod(path) => {
|
||||
|
|
Loading…
Add table
Reference in a new issue