stop it from recreating config folder every time (was it even doing that? who knows!)
This commit is contained in:
parent
1912b7bcb8
commit
90a305f55f
|
@ -39,7 +39,7 @@ pub fn create_config(file: &str) -> bool {
|
||||||
|
|
||||||
let file_path = std::path::Path::new(&path); // Path without the filename
|
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
|
// if the file_path has a parent folder
|
||||||
println!("lib::create_config: creating folder {path}");
|
println!("lib::create_config: creating folder {path}");
|
||||||
match fs::create_dir_all(&path) {
|
match fs::create_dir_all(&path) {
|
||||||
|
|
Loading…
Reference in New Issue