prepare page, fix ui and logic

This commit is contained in:
Julian Freeman
2025-12-07 20:54:53 -04:00
parent 05e714ef77
commit adc914694e
2 changed files with 10 additions and 6 deletions

View File

@@ -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
// 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())?;

View File

@@ -477,7 +477,7 @@ watch(currentDir, (newPath) => {
</el-form>
</el-card>
<el-divider />
<!-- <el-divider /> -->
<el-card class="box-card" shadow="hover">
<template #header>