mirror of
https://github.com/sadoyan/aralez.git
synced 2026-10-23 14:11:35 +08:00
Improved error handling, anti unwrap()-ing
This commit is contained in:
@@ -48,8 +48,8 @@ pub async fn load_configuration(d: &str, kind: &str) -> (Option<Configuration>,
|
||||
return (None, err_msg);
|
||||
}
|
||||
|
||||
let mut confdir = Path::new(d).parent().unwrap().to_path_buf();
|
||||
let mut autocfg = Path::new(d).parent().unwrap().to_path_buf();
|
||||
let mut confdir = Path::new(d).parent().die("Invalid configuration path").to_path_buf();
|
||||
let mut autocfg = Path::new(d).parent().die("Invalid configuration path").to_path_buf();
|
||||
|
||||
autocfg.push("autoconfigs");
|
||||
if fs::metadata(autocfg.clone()).is_err() {
|
||||
|
||||
Reference in New Issue
Block a user