diff --git a/pentest_tool/src/install.rs b/pentest_tool/src/install.rs index 492a88c..4b1ca40 100644 --- a/pentest_tool/src/install.rs +++ b/pentest_tool/src/install.rs @@ -122,6 +122,9 @@ pub fn install(config_path: &PathBuf){ config_folder_path.pop(); let mut projects_conf_path = config_folder_path.clone(); let mut bell_file_path = config_folder_path.clone(); + let del_on_fail = config_folder_path.clone(); + projects_conf_path.push("projects.conf"); + fs::create_dir_all(&config_folder_path).expect("error creating config dir"); bell_file_path.push("bell.mp3"); let bell_sound_url = "https://github.com/Pyro57000/pentest_tool/raw/refs/heads/main/resources/bell.mp3"; let response = get(bell_sound_url).unwrap(); @@ -129,9 +132,6 @@ pub fn install(config_path: &PathBuf){ let mut bell_file = File::create(bell_file_path).unwrap(); copy(&mut response.take(response_length), &mut bell_file).unwrap(); println!("bell notification tone sucessfully downloaded!"); - let del_on_fail = config_folder_path.clone(); - projects_conf_path.push("projects.conf"); - fs::create_dir_all(&config_folder_path).expect("error creating config dir"); let mut config_file = fs::File::create(config_path).expect("error creating file"); let mut projects_conf_file = fs::File::create(projects_conf_path).expect("error creating projects config file"); projects_conf_file.write_all(b"customer:name:notes:files:active:box_name\n").expect("error writing default project info");