Fix config reloading
Must have been broken when upgrading notify-rs
This commit is contained in:
parent
1cf9a179bc
commit
d3151dfbf9
|
@ -1454,12 +1454,16 @@ impl Monitor {
|
||||||
let config_path = ::std::fs::canonicalize(path)
|
let config_path = ::std::fs::canonicalize(path)
|
||||||
.expect("canonicalize config 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 {
|
loop {
|
||||||
let event = rx.recv().expect("watcher event");
|
match rx.recv().expect("watcher event") {
|
||||||
|
|
||||||
match event {
|
|
||||||
DebouncedEvent::Rename(_, _) => continue,
|
DebouncedEvent::Rename(_, _) => continue,
|
||||||
DebouncedEvent::Write(path) | DebouncedEvent::Create(path)
|
DebouncedEvent::Write(path) | DebouncedEvent::Create(path)
|
||||||
| DebouncedEvent::Chmod(path) => {
|
| DebouncedEvent::Chmod(path) => {
|
||||||
|
|
Loading…
Reference in New Issue