Merge pull request #37 from TeeWallz/main
Added call to create config directory
This commit is contained in:
@@ -91,6 +91,8 @@ fn load_default_config(config_file: &Path) -> Result<Config> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
fn create_empty_config_file(config_file: &Path) -> Result<()> {
|
fn create_empty_config_file(config_file: &Path) -> Result<()> {
|
||||||
|
std::fs::create_dir_all(config_file.parent().context("getting parent dir")?)
|
||||||
|
.context("creating parent dir")?;
|
||||||
std::fs::File::create(config_file).context("creating empty config file")?;
|
std::fs::File::create(config_file).context("creating empty config file")?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user