mirror of
https://github.com/zellij-org/zellij.git
synced 2024-11-22 04:33:22 +03:00
fix(config): crash if unable to watch config folder
This commit is contained in:
parent
5a75f2b6ad
commit
443b5f37ab
@ -707,10 +707,13 @@ fn report_changes_in_config_file(
|
||||
})
|
||||
.unwrap();
|
||||
if let Some(config_file_parent_folder) = config_file_path.parent() {
|
||||
watcher
|
||||
.watch(&config_file_parent_folder, RecursiveMode::Recursive)
|
||||
.unwrap();
|
||||
Some(Box::new(watcher))
|
||||
match watcher.watch(&config_file_parent_folder, RecursiveMode::Recursive) {
|
||||
Ok(_) => Some(Box::new(watcher)),
|
||||
Err(e) => {
|
||||
log::error!("Failed to watch config file folder: {}", e);
|
||||
None
|
||||
},
|
||||
}
|
||||
} else {
|
||||
log::error!("Could not find config parent folder");
|
||||
None
|
||||
|
Loading…
Reference in New Issue
Block a user