mirror of
https://github.com/rmcrackan/Libation.git
synced 2026-09-13 06:07:30 -04:00
The rollback restored files, announced 'Libation restored your previous install files', and deleted the pending marker without ever reading back what it had written. It also could not tell the difference between an overlay that had not started, where putting the backup back returns the install to one version, and an overlay that got partway, where the backup covers a dozen names out of the few hundred in the folder and cannot. Grade the outcome instead. Verify each restored file against its backup, and use the manifest files that did match the upgrade package as the signal that the overlay had begun. Report which files could not be restored, and keep restoring the rest rather than abandoning them at the first failure. Libation has to close either way, since the files underneath it just changed, so the wording and the offer now follow the grade: back on the previous version asks to restart, a mixed install asks but says a fresh install would be better, and a restore that could not finish only offers OK. A relaunched process never offers again, so a pending marker we failed to delete cannot become a loop. Co-authored-by: rmcrackan <rmcrackan@gmail.com>
18 lines
749 B
C#
18 lines
749 B
C#
namespace LibationFileManager;
|
|
|
|
/// <summary>
|
|
/// What startup found and repaired before the app came up, and whether restarting into the result is worth
|
|
/// offering the user.
|
|
/// </summary>
|
|
/// <param name="Message">Title and body to show.</param>
|
|
/// <param name="OfferRestart">
|
|
/// True when the install is worth going back into, so the user can be asked whether to restart now. False
|
|
/// when the rollback left files behind, where the honest answer is to install a fresh copy instead, and a
|
|
/// restart prompt would only invite the user into a broken install.
|
|
/// </param>
|
|
public sealed record StartupRecoveryNotice(FatalStartupMessage Message, bool OfferRestart)
|
|
{
|
|
public string Title => Message.Title;
|
|
public string Body => Message.Body;
|
|
}
|