Merge pull request #37 from TeeWallz/main

Added call to create config directory
This commit is contained in:
steven-omaha
2023-06-01 22:33:00 +02:00
committed by GitHub
+2
View File
@@ -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(())
} }