added a bit of error handling

and resolved some compiler warnings
This commit is contained in:
pyro57000
2024-12-18 12:57:06 -06:00
parent c878908719
commit 34d0c4ed09
29 changed files with 17 additions and 24 deletions

View File

@@ -72,8 +72,6 @@ pub fn new_project(projects: &mut Vec<Project>, project_dir: &PathBuf, notes_dir
let mut project_name = String::new();
println!("do you have an existing notes and folder structure to copy over?\ny/n");
std::io::stdin().read_line(&mut existing_folders).unwrap();
let mut customer_name = customer_name.trim_end().to_owned();
let mut project_name = project_name.trim_end().to_owned();
if existing_folders.contains("y") || existing_folders.contains("Y"){
println!("NOTE THIS WILL OVERWRITE CUSTOMER NAME AND PROJECT NAME WITH THE 2nd TO LAST AND LAST FOLDER NAMES IN THE PATH YOU'RE COPYING RESPECTIVELY");
let mut files_to_copy = String::new();