aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authornjaremko2017-07-19 16:30:34 -0400
committernjaremko2017-07-19 16:30:34 -0400
commit12f2652ff3576a53bbe36142749e18d491ebfbf0 (patch)
tree2da5249b997858c22757b2d4340ec2f44e15d0ad /src
parente17062f8114842f2b5ac9f6e6af4ffe59df55f63 (diff)
downloadpodcast-12f2652ff3576a53bbe36142749e18d491ebfbf0.tar.bz2
Fix potential folder creation bug
Diffstat (limited to 'src')
-rw-r--r--src/structs.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/structs.rs b/src/structs.rs
index 5fdca3b..7282996 100644
--- a/src/structs.rs
+++ b/src/structs.rs
@@ -53,6 +53,7 @@ impl State {
pub fn save(&self) -> Result<(), io::Error> {
let mut path = get_podcast_dir();
+ DirBuilder::new().recursive(true).create(&path).unwrap();
path.push(".subscriptions");
let serialized = serde_json::to_string(self)?;
let mut file = File::create(&path)?;