diff --git a/src/main.rs b/src/main.rs index 0a8cdde..4ff0d54 100644 --- a/src/main.rs +++ b/src/main.rs @@ -78,7 +78,12 @@ fn main() Err(_e) => PathBuf::from("./"), }; - if !data_dir.exists() + if data_dir.exists() && data_dir.is_file() + { + panic!("Error: {} file already exists! Please (re)move it.", + data_dir.display()); + } + else if !data_dir.exists() { println!("Creating {} data directory.", data_dir.display()); fs::create_dir_all(data_dir)