From 5a266b8e268163f3f25063aa823dd1fc72ee7c56 Mon Sep 17 00:00:00 2001 From: Silarn Date: Wed, 11 Dec 2019 12:06:36 -0600 Subject: When cancelling a fomod extraction, don't generate an error. --- src/installationmanager.cpp | 13 +++++++++++-- src/organizer_en.ts | 39 ++++++++++++++++++++------------------- 2 files changed, 31 insertions(+), 21 deletions(-) (limited to 'src') 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(installer); if ((installerCustom != nullptr) diff --git a/src/organizer_en.ts b/src/organizer_en.ts index ca82a996..d8995973 100644 --- a/src/organizer_en.ts +++ b/src/organizer_en.ts @@ -1527,90 +1527,91 @@ Right now the only case I know of where this needs to be overwritten is for the - - - + + + + Extraction failed: %1 - + Failed to create backup - + Mod Name - + Name - + Invalid name - + The name you entered is invalid, please enter a different one. - + File format "%1" not supported - + None of the available installer plugins were able to handle that archive. This is likely due to a corrupted or incompatible download or unrecognized archive format. - + no error - + 7z.dll not found - + 7z.dll isn't valid - + archive not found - + failed to open archive - + unsupported archive type - + internal library error - + archive invalid - + unknown archive error -- cgit v1.3.1