summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-09-25 08:06:23 +0200
committerPetr Mrázek <peterix@gmail.com>2017-09-25 08:06:23 +0200
commitc82042dcfa79b4047d3663db3a9d82ac254b04ff (patch)
tree637e59cf844fa66174a3fb2b97bb3ccb421b9bc9
parentb5b16d0972f40bbfa14518542cbdac20747921ec (diff)
downloadMultiMC-c82042dcfa79b4047d3663db3a9d82ac254b04ff.tar
MultiMC-c82042dcfa79b4047d3663db3a9d82ac254b04ff.tar.gz
MultiMC-c82042dcfa79b4047d3663db3a9d82ac254b04ff.tar.lz
MultiMC-c82042dcfa79b4047d3663db3a9d82ac254b04ff.tar.xz
MultiMC-c82042dcfa79b4047d3663db3a9d82ac254b04ff.zip
GH-2000 translate 'required' from Flame pack manifests to '.disabled'
-rw-r--r--api/logic/InstanceImportTask.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/api/logic/InstanceImportTask.cpp b/api/logic/InstanceImportTask.cpp
index 7963a335..e5634ac4 100644
--- a/api/logic/InstanceImportTask.cpp
+++ b/api/logic/InstanceImportTask.cpp
@@ -297,7 +297,12 @@ void InstanceImportTask::processFlame()
m_filesNetJob.reset(new NetJob(tr("Mod download")));
for(auto result: results.files)
{
- auto path = FS::PathCombine(m_stagingPath ,"minecraft", result.targetFolder, result.fileName);
+ QString filename = result.fileName;
+ if(!result.required)
+ {
+ filename += ".disabled";
+ }
+ auto path = FS::PathCombine(m_stagingPath ,"minecraft", result.targetFolder, filename);
auto dl = Net::Download::makeFile(result.url, path);
m_filesNetJob->addNetAction(dl);
}