X-Git-Url: https://git.r.bdr.sh/rbdr/page/blobdiff_plain/4fd89b808cabc8afb0d75b9700be1da96989c4b7..7a397dd96bd204d42e57c26d848222155d8a5390:/src/main.rs?ds=inline diff --git a/src/main.rs b/src/main.rs index e04da8a..7ab009e 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,7 +4,7 @@ mod file_handler; use std::io::Result; use std::env::current_dir; -use std::fs::create_dir_all; +use std::fs::{create_dir_all, remove_dir_all}; use crate::gemini_parser::parse; use crate::file_finder::find_files; @@ -25,6 +25,9 @@ fn main() -> Result<()> { let files = find_files(&source); // Step 2. Prepare the target priority + match remove_dir_all(&destination) { + _ => {} + }; create_dir_all(&destination)?; println!("Found {} files", files.len());