From 84c673c5ba6178afda85dbc9a4a83d9e5fcf5d47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Wed, 10 Mar 2021 03:57:36 +0100 Subject: [PATCH] GH-3467 fix stall-out in ScanModFolders when the folders don't exist --- api/logic/minecraft/launch/ScanModFolders.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/api/logic/minecraft/launch/ScanModFolders.cpp b/api/logic/minecraft/launch/ScanModFolders.cpp index f792efcd..2a0e21b3 100644 --- a/api/logic/minecraft/launch/ScanModFolders.cpp +++ b/api/logic/minecraft/launch/ScanModFolders.cpp @@ -27,11 +27,16 @@ void ScanModFolders::executeTask() auto loaders = m_inst->loaderModList(); connect(loaders.get(), &ModFolderModel::updateFinished, this, &ScanModFolders::modsDone); - loaders->update(); + if(!loaders->update()) { + m_modsDone = true; + } auto cores = m_inst->coreModList(); connect(cores.get(), &ModFolderModel::updateFinished, this, &ScanModFolders::coreModsDone); - cores->update(); + if(!cores->update()) { + m_coreModsDone = true; + } + checkDone(); } void ScanModFolders::modsDone()