diff options
| author | Silarn <jrim@rimpo.org> | 2019-12-11 12:06:36 -0600 |
|---|---|---|
| committer | Silarn <jrim@rimpo.org> | 2019-12-11 12:06:36 -0600 |
| commit | 5a266b8e268163f3f25063aa823dd1fc72ee7c56 (patch) | |
| tree | 9a528035fc209ef271cba08c3772040faca083be /src/installationmanager.cpp | |
| parent | 2001f2675782ffe8f987daaed099ce3ee3a57a1c (diff) | |
When cancelling a fomod extraction, don't generate an error.
Diffstat (limited to 'src/installationmanager.cpp')
| -rw-r--r-- | src/installationmanager.cpp | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index dd5cfb55..8ea2bac7 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -307,7 +307,16 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool QCoreApplication::processEvents(); } while (!future.isFinished() || m_InstallationProgress->isVisible()); if (!future.result()) { - throw MyException(tr("Extraction failed: %1").arg(m_ArchiveHandler->getLastError())); + if (m_ArchiveHandler->getLastError() == Archive::ERROR_EXTRACT_CANCELLED) { + if (!m_ErrorMessage.isEmpty()) { + throw MyException(tr("Extraction failed: %1").arg(m_ErrorMessage)); + } else { + return QStringList(); + } + } + else { + throw MyException(tr("Extraction failed: %1").arg(m_ArchiveHandler->getLastError())); + } } return result; @@ -839,7 +848,7 @@ bool InstallationManager::install(const QString &fileName, } } - { // custom case + if (installResult != IPluginInstaller::RESULT_CANCELED) { // custom case IPluginInstallerCustom *installerCustom = dynamic_cast<IPluginInstallerCustom *>(installer); if ((installerCustom != nullptr) |
