1
0
mirror of synced 2025-01-29 19:17:28 +01:00

fix: Uncaught exception when trying to update all store items

This commit is contained in:
WerWolv 2023-12-28 20:35:35 +01:00
parent 390b5a7925
commit 2d7a6a7cb5

View File

@ -203,6 +203,9 @@ namespace hex::plugin::builtin {
for (auto &entry : category.entries) {
if (entry.hasUpdate) {
entry.downloading = this->download(category.path, entry.fileName, entry.link, true);
if (!m_download.valid())
continue;
m_download.wait();
this->handleDownloadFinished(category, entry);
task.update(progress);
@ -305,12 +308,13 @@ namespace hex::plugin::builtin {
return false;
}
log::info("{} file {}", update ? "Updating" : "Downloading", fullPath.string());
if (!update || wolv::io::fs::exists(fullPath)) {
downloading = true;
downloading = true;
m_downloadPath = fullPath;
m_httpRequest.setUrl(url);
m_download = m_httpRequest.downloadFile(fullPath);
m_download = m_httpRequest.downloadFile(fullPath);
break;
}
}