updated the promote project folder clean up to leave the folders there

if there are still projects.
This commit is contained in:
pyro committed 2026-09-30 11:56:58 -05:00
1 parent c2d6174fc9
commit b18ada61c7
1 file changed
+14 -2
+14 -2
View File
@@ -2101,8 +2101,20 @@ impl AppState {
let mut old_notes = new_project.notes.clone(); let mut old_notes = new_project.notes.clone();
old_files.pop(); old_files.pop();
old_notes.pop(); old_notes.pop();
remove_dir_all(&old_files)?; remove_dir_all(&new_project.files)?;
remove_dir_all(&old_notes)?; remove_dir_all(&new_project.notes)?;
if let Err(_) = remove_dir(old_files) {
self.main_tx.send(ToolMessage::Output((
rid,
String::from("organization files folder is not empty and will not be deleted."),
)))?;
}
if let Err(_) = remove_dir(old_notes) {
self.main_tx.send(ToolMessage::Output((
rid,
String::from("organization notes folder is not empty and will not be deleted."),
)))?;
}
new_files_path.push(&new_project.name); new_files_path.push(&new_project.name);
new_notes_path.push(&new_project.name); new_notes_path.push(&new_project.name);
new_project.files(new_files_path.clone()); new_project.files(new_files_path.clone());