fix: bogus returns in EnsureMetadataTask

Signed-off-by: flow <flowlnlnln@gmail.com>
This commit is contained in:
flow 2022-07-17 11:43:12 -03:00
parent de9e304236
commit 6bb8332b4b
No known key found for this signature in database
GPG Key ID: 8D0F221F0A59F469

View File

@ -96,20 +96,22 @@ void EnsureMetadataTask::executeTask()
setStatus(tr("Checking if mods have metadata..."));
for (auto* mod : m_mods) {
if (!mod->valid())
if (!mod->valid()) {
qDebug() << "Mod" << mod->name() << "is invalid!";
emitFail(mod);
continue;
}
// They already have the right metadata :o
if (mod->status() != ModStatus::NoMetadata && mod->metadata() && mod->metadata()->provider == m_provider) {
qDebug() << "Mod" << mod->name() << "already has metadata!";
emitReady(mod);
return;
continue;
}
// Folders don't have metadata
if (mod->type() == Mod::MOD_FOLDER) {
emitReady(mod);
return;
}
}