summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/onesix/update/LibrariesTask.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-04-07 00:27:24 +0200
committerPetr Mrázek <peterix@gmail.com>2017-04-07 00:27:24 +0200
commit795889d934e8f4ebe89be1a49a3417fd98e89be1 (patch)
treec5b0d30d425003c4b88e84a2908e63eb5ed797b9 /api/logic/minecraft/onesix/update/LibrariesTask.cpp
parent160b5033a79e6b5ee9f3e2a001b96c677f41ddcb (diff)
parent8e58d61150b0bdbe9eb91065d36342f3004fe97b (diff)
downloadMultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.gz
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.lz
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.tar.xz
MultiMC-795889d934e8f4ebe89be1a49a3417fd98e89be1.zip
Merge branch 'feature/meta' into develop
Diffstat (limited to 'api/logic/minecraft/onesix/update/LibrariesTask.cpp')
-rw-r--r--api/logic/minecraft/onesix/update/LibrariesTask.cpp18
1 files changed, 11 insertions, 7 deletions
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<LibraryPtr> brokenLocalLibs;
QStringList failedFiles;
- for (auto lib : libs)
+ auto createJobs = [&](const QList<LibraryPtr> & 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())
{