Исправлено формирование команды

pull/13/head
Igor Belitskiy 3 years ago
parent 48edcdf6c4
commit 0d28917d4f

File diff suppressed because it is too large Load Diff

@ -303,6 +303,7 @@ void MainWindow::tempate_icon_select(Gtk::IconView *icon, Glib::RefPtr<Gtk::List
str_remove(name_app, del_sim);
if (name_app.length() != len_name_app) {
txtCmd->set_text(name_app);
this->denamic_cmd();
break;
}
}
@ -508,18 +509,21 @@ string MainWindow::start_cmd(string user_cmd) {
}
string cmd = "";
if (path_file.length() > 0) {
cmd = "nohup " + str_nice_cmd + str_cmd_terminal + str_variants_root + " xdg-open '" + path_file + "' ";
cmd = str_nice_cmd + str_cmd_terminal + str_variants_root + " xdg-open '" + path_file + "' ";
}
else if (name_app.length() > 0) {
cmd = "nohup " + str_nice_cmd + str_cmd_terminal + str_variants_root + name_app;
cmd = str_nice_cmd + str_cmd_terminal + str_variants_root + name_app;
}
else if (user_cmd.length() > 0) {
cmd = "nohup " + str_nice_cmd + str_cmd_terminal + str_variants_root + " " + user_cmd;
cmd = str_nice_cmd + str_cmd_terminal + str_variants_root + " " + user_cmd;
}
if (cmd.find("-e su ") != string::npos) {
cmd+=" \"";
}
cmd = "nohup " + cmd;
cmd += " > /dev/null 2>&1";
//string str_remove = " ";
//this->str_remove(cmd, str_remove);
return cmd;
}

Loading…
Cancel
Save