Skip to content

Commit

Permalink
fix: create config directory if it doesn't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
ryanabx committed Apr 27, 2024
1 parent c749229 commit 0de2ed0
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,7 @@ async fn main() -> Result<(), CDEError> {
match conf_path.try_exists() {
Ok(false) | Err(_) => {
log::error!("Cannot find config at '{:?}'", conf_path);
let _ = fs::create_dir(conf_path.parent().unwrap());
let _ = fs::write(conf_path, "");
}
_ => {}
Expand Down

0 comments on commit 0de2ed0

Please sign in to comment.