From 7be164181d6012faaf775ce259568876f92fdd7c Mon Sep 17 00:00:00 2001 From: Maschell Date: Sat, 5 Dec 2020 20:14:29 +0100 Subject: [PATCH] Relax the requirements for a removal a bit. It's enough to have backups --- source/ApplicationState.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/ApplicationState.cpp b/source/ApplicationState.cpp index 0107024..464ee02 100644 --- a/source/ApplicationState.cpp +++ b/source/ApplicationState.cpp @@ -338,10 +338,10 @@ void ApplicationState::checkColdbootStatus() { void ApplicationState::checkRemovalPossible() { DEBUG_FUNCTION_LINE("Check removal possible"); - this->removalPossible = this->alreadyInstalled; - if (this->removalPossible) { - this->removalPossible &= this->systemXMLRestorePossible || !this->systemXMLAlreadyPatched; - } + // We can only restore if a restore of the system.xml is possible or it isn't patched at all. + this->removalPossible = !this->systemXMLAlreadyPatched || this->systemXMLRestorePossible; + + // And we can only install if we have a backup. if (this->removalPossible) { this->removalPossible &= InstallerService::isBackupAvailable(this->appInfo->path); }