diff --git a/src/lib.rs b/src/lib.rs index 0454a0d..7ffda28 100755 --- a/src/lib.rs +++ b/src/lib.rs @@ -39,7 +39,7 @@ pub fn create_config(file: &str) -> bool { let file_path = std::path::Path::new(&path); // Path without the filename - if file_path.parent().is_some() { + if file_path.parent().is_some() && !file_path.exists() { // if the file_path has a parent folder println!("lib::create_config: creating folder {path}"); match fs::create_dir_all(&path) {