From 307fd23b9d6eda67c3c9a1e1cc72cebb454444ef Mon Sep 17 00:00:00 2001 From: Piyush Mishra Date: Thu, 27 Jan 2022 15:59:11 +0530 Subject: [PATCH] bug fix: conf extension wasn't changed to prop --- Cargo.lock | 2 +- Cargo.toml | 2 +- src/draw_thread.rs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 3c0978d..26e79a8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -626,7 +626,7 @@ dependencies = [ [[package]] name = "post_maker" -version = "0.2.1" +version = "0.2.2" dependencies = [ "clap", "dirs", diff --git a/Cargo.toml b/Cargo.toml index 68af7fd..3426a21 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "post_maker" -version = "0.2.1" +version = "0.2.2" edition = "2021" description = "Post Maker helps you to make post for Instagram and other Social Media apps easily." authors = ["PiyushXCoder "] diff --git a/src/draw_thread.rs b/src/draw_thread.rs index 63d849a..c34e418 100644 --- a/src/draw_thread.rs +++ b/src/draw_thread.rs @@ -258,16 +258,16 @@ fn load_image( if let Some(cont) = container { let file = Path::new(&file); - let conf = file.with_extension("conf"); + let properties_file = file.with_extension("prop"); - let read = fs::read_to_string(&conf).unwrap_or("{}".to_owned()); + let read = fs::read_to_string(&properties_file).unwrap_or("{}".to_owned()); let read = match serde_json::from_str::(&read) { Ok(r) => r, Err(e) => { warn!("Config is corrupt\n{:?}", e); match dialog::choice_default("Config is corrupt, fix??", "yes", "no", "") { 1 => { - if let Err(e) = fs::remove_file(&conf) { + if let Err(e) = fs::remove_file(&properties_file) { dialog::alert_default("Failed to delete image properties file!"); warn!("Failed to delete image properties file!\n{:?}", e); }