fix(config): crash if unable to watch config folder (#3761)
This commit is contained in:
parent
3f719d1c50
commit
7bcd5696a5
1 changed files with 7 additions and 4 deletions
|
|
@ -707,10 +707,13 @@ fn report_changes_in_config_file(
|
||||||
})
|
})
|
||||||
.unwrap();
|
.unwrap();
|
||||||
if let Some(config_file_parent_folder) = config_file_path.parent() {
|
if let Some(config_file_parent_folder) = config_file_path.parent() {
|
||||||
watcher
|
match watcher.watch(&config_file_parent_folder, RecursiveMode::Recursive) {
|
||||||
.watch(&config_file_parent_folder, RecursiveMode::Recursive)
|
Ok(_) => Some(Box::new(watcher)),
|
||||||
.unwrap();
|
Err(e) => {
|
||||||
Some(Box::new(watcher))
|
log::error!("Failed to watch config file folder: {}", e);
|
||||||
|
None
|
||||||
|
},
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
log::error!("Could not find config parent folder");
|
log::error!("Could not find config parent folder");
|
||||||
None
|
None
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue