Skip to content

Commit 60191ef

Browse files
committed
fixes an issue with creating directory for documentation
1 parent ee29637 commit 60191ef

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "billable"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
edition = "2021"
55
authors = ["Robert Wijas"]
66
description = "Displays monthly reports for billable hours. Supports Toggl and Harvest."

src/main.rs

+6
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,12 @@ fn main() {
5656
.unwrap_or(false)
5757
{
5858
let path = user_config_path.with_extension("toml");
59+
std::fs::create_dir_all(
60+
&path
61+
.parent()
62+
.expect("config location should have parent directory"),
63+
)
64+
.expect("failed to create directory for configuration");
5965
std::fs::write(&path, CONFIG_FILE_EXAMPLE).expect("failed to write configuration");
6066

6167
println!(

0 commit comments

Comments
 (0)