From 8856c8cd62fe3f45faf1020e70fa3dc503eb3453 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Sat, 4 Jun 2022 15:30:34 +0200 Subject: refactor(test): fix loading mod metadata setting --- launcher/ModDownloadTask.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'launcher/ModDownloadTask.cpp') diff --git a/launcher/ModDownloadTask.cpp b/launcher/ModDownloadTask.cpp index 301b6637..a54baec4 100644 --- a/launcher/ModDownloadTask.cpp +++ b/launcher/ModDownloadTask.cpp @@ -21,12 +21,14 @@ #include "Application.h" #include "minecraft/mod/ModFolderModel.h" -ModDownloadTask::ModDownloadTask(ModPlatform::IndexedPack mod, ModPlatform::IndexedVersion version, const std::shared_ptr mods) +ModDownloadTask::ModDownloadTask(ModPlatform::IndexedPack mod, ModPlatform::IndexedVersion version, const std::shared_ptr mods, bool is_indexed) : m_mod(mod), m_mod_version(version), mods(mods) { - m_update_task.reset(new LocalModUpdateTask(mods->indexDir(), m_mod, m_mod_version)); + if (is_indexed) { + m_update_task.reset(new LocalModUpdateTask(mods->indexDir(), m_mod, m_mod_version)); - addTask(m_update_task); + addTask(m_update_task); + } m_filesNetJob.reset(new NetJob(tr("Mod download"), APPLICATION->network())); m_filesNetJob->setStatus(tr("Downloading mod:\n%1").arg(m_mod_version.downloadUrl)); -- cgit