diff options
| author | Tannin <devnull@localhost> | 2014-11-06 00:03:44 +0100 |
|---|---|---|
| committer | Tannin <devnull@localhost> | 2014-11-06 00:03:44 +0100 |
| commit | 20db939501958275eb591c7737ffcc3f5f7685bd (patch) | |
| tree | 09f8f9008e9a7045ff22150634cfa479670c841d /src | |
| parent | bfa6c9ab1e2f316c53811de6e311212b8a088591 (diff) | |
- workaround for GetModuleFileName-calls that supply wrong buffer size
- removed obsoleted calls to GetVersionEx
- bugfix: download urls were potentially not encoded correctly
- bugfixes to tls-based recursion protection
Diffstat (limited to 'src')
| -rw-r--r-- | src/downloadmanager.cpp | 3 | ||||
| -rw-r--r-- | src/installationmanager.cpp | 4 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/downloadmanager.cpp b/src/downloadmanager.cpp index 931201d1..b803d170 100644 --- a/src/downloadmanager.cpp +++ b/src/downloadmanager.cpp @@ -332,6 +332,7 @@ bool DownloadManager::addDownload(const QStringList &URLs, }
QUrl preferredUrl = QUrl::fromEncoded(URLs.first().toLocal8Bit());
+ qDebug("selected download url: %s", qPrintable(preferredUrl.toString()));
QNetworkRequest request(preferredUrl);
return addDownload(m_NexusInterface->getAccessManager()->get(request), URLs, fileName, modID, fileID, fileInfo);
}
@@ -645,7 +646,7 @@ void DownloadManager::resumeDownloadInt(int index) info->m_CurrentUrl = (info->m_CurrentUrl + 1) % info->m_Urls.count();
}
qDebug("request resume from url %s", qPrintable(info->currentURL()));
- QNetworkRequest request(info->currentURL());
+ QNetworkRequest request(QUrl::fromEncoded(info->currentURL().toLocal8Bit()));
info->m_ResumePos = info->m_Output.size();
qDebug("resume at %lld bytes", info->m_ResumePos);
QByteArray rangeHeader = "bytes=" + QByteArray::number(info->m_ResumePos) + "-";
diff --git a/src/installationmanager.cpp b/src/installationmanager.cpp index 29914b65..d6435e57 100644 --- a/src/installationmanager.cpp +++ b/src/installationmanager.cpp @@ -257,7 +257,7 @@ QStringList InstallationManager::extractFiles(const QStringList &filesOrig, bool new MethodCallback<InstallationManager, void, LPCWSTR>(this, &InstallationManager::dummyProgressFile),
new MethodCallback<InstallationManager, void, LPCWSTR>(this, &InstallationManager::report7ZipError))) {
m_InstallationProgress.hide();
- throw std::runtime_error("extracting failed");
+ throw MyException(QString("extracting failed (%1)").arg(m_CurrentArchive->getLastError()));
}
m_InstallationProgress.hide();
@@ -542,7 +542,7 @@ bool InstallationManager::doInstall(GuessedValue<QString> &modName, int modID, if (m_CurrentArchive->getLastError() == Archive::ERROR_EXTRACT_CANCELLED) {
return false;
} else {
- throw std::runtime_error("extracting failed");
+ throw MyException(QString("extracting failed (%1)").arg(m_CurrentArchive->getLastError()));
}
}
|
