1
0
mirror of synced 2025-02-06 14:14:22 +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,6 +308,7 @@ namespace hex::plugin::builtin {
return false;
}
log::info("{} file {}", update ? "Updating" : "Downloading", fullPath.string());
if (!update || wolv::io::fs::exists(fullPath)) {
downloading = true;
m_downloadPath = fullPath;