From 8e58d61150b0bdbe9eb91065d36342f3004fe97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petr=20Mr=C3=A1zek?= Date: Thu, 6 Apr 2017 23:31:23 +0200 Subject: NOISSUE fix issue with the narrator feature by splitting java and native libraries --- api/logic/minecraft/onesix/update/LibrariesTask.cpp | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'api/logic/minecraft/onesix/update/LibrariesTask.cpp') diff --git a/api/logic/minecraft/onesix/update/LibrariesTask.cpp b/api/logic/minecraft/onesix/update/LibrariesTask.cpp index f60c2b5e..3e6bb12a 100644 --- a/api/logic/minecraft/onesix/update/LibrariesTask.cpp +++ b/api/logic/minecraft/onesix/update/LibrariesTask.cpp @@ -35,19 +35,23 @@ void LibrariesTask::executeTask() downloadJob.reset(job); } - auto libs = profile->getLibraries(); - auto metacache = ENV.metacache(); QList brokenLocalLibs; QStringList failedFiles; - for (auto lib : libs) + auto createJobs = [&](const QList & libs) { - auto dls = lib->getDownloads(currentSystem, metacache.get(), failedFiles, inst->getLocalLibraryPath()); - for(auto dl : dls) + for (auto lib : libs) { - downloadJob->addNetAction(dl); + auto dls = lib->getDownloads(currentSystem, metacache.get(), failedFiles, inst->getLocalLibraryPath()); + for(auto dl : dls) + { + downloadJob->addNetAction(dl); + } } - } + }; + createJobs(profile->getLibraries()); + createJobs(profile->getNativeLibraries()); + // FIXME: this is never filled!!!! if (!brokenLocalLibs.empty()) { -- cgit v1.2.3