Commit 33881fac authored by guinux's avatar guinux

little fixes

parent 46f9e440
......@@ -670,7 +670,7 @@ namespace Pamac {
return;
}
init_transaction ();
if (keep > 0) {
if (keep >= 0) {
database.config.clean_keep_num_pkgs = keep;
}
if (uninstalled) {
......
......@@ -1327,14 +1327,17 @@ namespace Pamac {
int status = 1;
try {
Subprocess process = launcher.spawnv (cmds);
process.wait (cancellable);
if (cancellable.is_cancelled ()) {
process.force_exit ();
try {
process.wait (cancellable);
if (process.get_if_exited ()) {
status = process.get_exit_status ();
}
} catch (Error e) {
// cancelled
process.send_signal (Posix.Signal.INT);
process.send_signal (Posix.Signal.KILL);
return 1;
}
if (process.get_if_exited ()) {
status = process.get_exit_status ();
}
} catch (Error e) {
critical ("%s\n", e.message);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment