1 Commits
Author SHA1 Message Date
pyro a37f78a4e7 fixed a bug in the promotion where the folder for the client was not
cleaned out of the upcoming folders.
2026-09-30 10:10:51 -05:00
+29 -3
View File
@@ -585,6 +585,19 @@ impl AppState {
} else { } else {
if let Some((prog, _)) = cmd.split_once(" ") { if let Some((prog, _)) = cmd.split_once(" ") {
let mut launch_cmd = Command::new(prog); let mut launch_cmd = Command::new(prog);
match prog {
"konsole" => {
launch_cmd
.arg(format!("--workdir {}", project.files.display()));
}
"xfce4-terminal" => {
launch_cmd.arg(format!(
"--working-directory={}",
project.files.display()
));
}
_ => {}
}
match launch_cmd.spawn() { match launch_cmd.spawn() {
Ok(_) => {} Ok(_) => {}
Err(e) => { Err(e) => {
@@ -2084,8 +2097,12 @@ impl AppState {
rid, rid,
String::from("[success] folders copied!"), String::from("[success] folders copied!"),
)))?; )))?;
remove_dir_all(&new_project.files)?; let mut old_files = new_project.files.clone();
remove_dir_all(&new_project.notes)?; let mut old_notes = new_project.notes.clone();
old_files.pop();
old_notes.pop();
remove_dir_all(&old_files)?;
remove_dir_all(&old_notes)?;
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());
@@ -2097,9 +2114,13 @@ impl AppState {
)))?; )))?;
self.main_tx.send(ToolMessage::Output(( self.main_tx.send(ToolMessage::Output((
rid, rid,
String::from("creating distrobox..."), String::from("checking if distrobox should be used..."),
)))?; )))?;
if let Some(mut db) = new_project.db { if let Some(mut db) = new_project.db {
self.main_tx.send(ToolMessage::Output((
rid,
String::from("creating distrobox..."),
)))?;
db.volumes = vec![ db.volumes = vec![
new_files_path.display().to_string(), new_files_path.display().to_string(),
new_notes_path.display().to_string(), new_notes_path.display().to_string(),
@@ -2111,6 +2132,11 @@ impl AppState {
rid, rid,
String::from("distrobox sent to rebuild function..."), String::from("distrobox sent to rebuild function..."),
)))?; )))?;
} else {
self.main_tx.send(ToolMessage::Output((
rid,
String::from("Distrobox was not configured at the creation of this project, so no distrobox will be created."),
)))?;
} }
new_project.save_config()?; new_project.save_config()?;
self.projects[self.selected_project] = new_project; self.projects[self.selected_project] = new_project;