diff options
author | Petr Mrázek <peterix@gmail.com> | 2017-09-04 08:17:25 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2017-09-04 08:17:25 +0200 |
commit | d80382180ef14d814eb9f6d7f2bf5db362f25cc2 (patch) | |
tree | 824dae31e08a961be3b1f0bf0129419ccbbef9b2 /api/logic/InstanceCreationTask.cpp | |
parent | b8adbb9b73751b022b42180dcc213dc99be9765b (diff) | |
download | MultiMC-d80382180ef14d814eb9f6d7f2bf5db362f25cc2.tar MultiMC-d80382180ef14d814eb9f6d7f2bf5db362f25cc2.tar.gz MultiMC-d80382180ef14d814eb9f6d7f2bf5db362f25cc2.tar.lz MultiMC-d80382180ef14d814eb9f6d7f2bf5db362f25cc2.tar.xz MultiMC-d80382180ef14d814eb9f6d7f2bf5db362f25cc2.zip |
NOISSUE refactor pack import (extraction and paths)
It now:
* Doesn't extract until it knows the content format is good.
* Extracts in a predictable location, not requiring to use a second path for the actual pack root.
Diffstat (limited to 'api/logic/InstanceCreationTask.cpp')
-rw-r--r-- | api/logic/InstanceCreationTask.cpp | 10 |
1 files changed, 1 insertions, 9 deletions
diff --git a/api/logic/InstanceCreationTask.cpp b/api/logic/InstanceCreationTask.cpp index e7b0de7c..a615d6ff 100644 --- a/api/logic/InstanceCreationTask.cpp +++ b/api/logic/InstanceCreationTask.cpp @@ -20,14 +20,6 @@ InstanceCreationTask::InstanceCreationTask(SettingsObjectPtr settings, BaseInsta void InstanceCreationTask::executeTask() { setStatus(tr("Creating instance from version %1").arg(m_version->name())); - /* - auto minecraftVersion = std::dynamic_pointer_cast<MinecraftVersion>(m_version); - if(!minecraftVersion) - { - emitFailed(tr("The supplied version is not a Minecraft version.")); - return ; - } - */ QString stagingPath = m_target->getStagedInstancePath(); QDir rootDir(stagingPath); @@ -41,6 +33,6 @@ void InstanceCreationTask::executeTask() inst->setName(m_instName); inst->setIconKey(m_instIcon); inst->init(); - m_target->commitStagedInstance(stagingPath, stagingPath, m_instName, m_instGroup); + m_target->commitStagedInstance(stagingPath, m_instName, m_instGroup); emitSucceeded(); } |