diff --git a/src-tauri/src/lib.rs b/src-tauri/src/lib.rs
index 3147004..a0e4022 100644
--- a/src-tauri/src/lib.rs
+++ b/src-tauri/src/lib.rs
@@ -34,15 +34,19 @@ fn copy_directory(template_path: String, target_path: String, new_folder_name: S
return Err("Template directory does not exist".to_string());
}
- if destination.exists() {
- return Err(format!("Destination directory already exists: {:?}", destination));
- }
+ // Remove the check for existing destination to allow merging/overwriting
+ // if destination.exists() {
+ // return Err(format!("Destination directory already exists: {:?}", destination));
+ // }
- // Create the destination directory first
- std::fs::create_dir_all(&destination).map_err(|e| e.to_string())?;
+ // Create the destination directory first if it doesn't exist
+ if !destination.exists() {
+ std::fs::create_dir_all(&destination).map_err(|e| e.to_string())?;
+ }
let mut options = CopyOptions::new();
options.content_only = true;
+ options.overwrite = true; // Enable overwrite for existing files
fs_extra::dir::copy(template, &destination, &options)
.map_err(|e| e.to_string())?;
diff --git a/src/App.vue b/src/App.vue
index 64fa610..f60cec2 100644
--- a/src/App.vue
+++ b/src/App.vue
@@ -477,7 +477,7 @@ watch(currentDir, (newPath) => {
-
+