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 | |
| parent | 2001f2675782ffe8f987daaed099ce3ee3a57a1c (diff) | |
When cancelling a fomod extraction, don't generate an error.
Diffstat (limited to 'src')
| -rw-r--r-- | src/installationmanager.cpp | 13 | ||||
| -rw-r--r-- | src/organizer_en.ts | 39 |
2 files changed, 31 insertions, 21 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) 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 <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="310"/> - <location filename="installationmanager.cpp" line="619"/> - <location filename="installationmanager.cpp" line="624"/> + <location filename="installationmanager.cpp" line="312"/> + <location filename="installationmanager.cpp" line="318"/> + <location filename="installationmanager.cpp" line="628"/> + <location filename="installationmanager.cpp" line="633"/> <source>Extraction failed: %1</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="494"/> + <location filename="installationmanager.cpp" line="503"/> <source>Failed to create backup</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="503"/> + <location filename="installationmanager.cpp" line="512"/> <source>Mod Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="503"/> + <location filename="installationmanager.cpp" line="512"/> <source>Name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="556"/> + <location filename="installationmanager.cpp" line="565"/> <source>Invalid name</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="557"/> + <location filename="installationmanager.cpp" line="566"/> <source>The name you entered is invalid, please enter a different one.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="725"/> + <location filename="installationmanager.cpp" line="734"/> <source>File format "%1" not supported</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="888"/> + <location filename="installationmanager.cpp" line="897"/> <source>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.</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="900"/> + <location filename="installationmanager.cpp" line="909"/> <source>no error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="903"/> + <location filename="installationmanager.cpp" line="912"/> <source>7z.dll not found</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="906"/> + <location filename="installationmanager.cpp" line="915"/> <source>7z.dll isn't valid</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="909"/> + <location filename="installationmanager.cpp" line="918"/> <source>archive not found</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="912"/> + <location filename="installationmanager.cpp" line="921"/> <source>failed to open archive</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="915"/> + <location filename="installationmanager.cpp" line="924"/> <source>unsupported archive type</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="918"/> + <location filename="installationmanager.cpp" line="927"/> <source>internal library error</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="921"/> + <location filename="installationmanager.cpp" line="930"/> <source>archive invalid</source> <translation type="unfinished"></translation> </message> <message> - <location filename="installationmanager.cpp" line="925"/> + <location filename="installationmanager.cpp" line="934"/> <source>unknown archive error</source> <translation type="unfinished"></translation> </message> |
