Skip to content

Commit a21c9b8

Browse files
committed
Fix install bug with simple install flow where apps failed to install
1 parent 120e207 commit a21c9b8

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

src/application.vala

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,11 @@ Examples:
460460
return;
461461
}
462462

463+
// Hold the application alive while the install runs in a background thread.
464+
// Without this, the dialog closing (from DialogWindow.add_option) may leave
465+
// zero windows, causing GtkApplication to quit before the thread finishes.
466+
// For reinstalls this is catastrophic: uninstall completes but install never does.
467+
this.hold();
463468
quick_install_run_async.begin(appimage_path, staged_path, staged_dir, mode, existing);
464469
}
465470

@@ -505,6 +510,9 @@ Examples:
505510
} else if (record != null) {
506511
quick_install_show_success(record, upgraded);
507512
}
513+
514+
// Allow normal shutdown now that result dialog is presented
515+
this.release();
508516
}
509517

510518
private void quick_install_show_success(InstallationRecord record, bool upgraded) {

0 commit comments

Comments
 (0)