summaryrefslogtreecommitdiffstats
path: root/logic/InstanceFactory.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2014-02-24 00:28:59 +0100
committerPetr Mrázek <peterix@gmail.com>2014-02-24 00:28:59 +0100
commite3d2e5fd7405baa8137e300e8cc817e70df172b7 (patch)
tree1829794eec361e593d612017e4502a7cf95b4252 /logic/InstanceFactory.cpp
parent71467246079bd7545472bda161dcaf5549205d33 (diff)
parent4883d1526222f9804f304f4cc189d6e44cb22b97 (diff)
downloadMultiMC-e3d2e5fd7405baa8137e300e8cc817e70df172b7.tar
MultiMC-e3d2e5fd7405baa8137e300e8cc817e70df172b7.tar.gz
MultiMC-e3d2e5fd7405baa8137e300e8cc817e70df172b7.tar.lz
MultiMC-e3d2e5fd7405baa8137e300e8cc817e70df172b7.tar.xz
MultiMC-e3d2e5fd7405baa8137e300e8cc817e70df172b7.zip
Merge branch 'fix_ftb' into integration_json_and_tools
Diffstat (limited to 'logic/InstanceFactory.cpp')
-rw-r--r--logic/InstanceFactory.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/logic/InstanceFactory.cpp b/logic/InstanceFactory.cpp
index 807bccd0..d6e06133 100644
--- a/logic/InstanceFactory.cpp
+++ b/logic/InstanceFactory.cpp
@@ -75,6 +75,7 @@ InstanceFactory::InstLoadError InstanceFactory::loadInstance(BaseInstance *&inst
{
return InstanceFactory::UnknownLoadError;
}
+ inst->init();
return NoLoadError;
}
@@ -156,6 +157,8 @@ InstanceFactory::InstCreateError InstanceFactory::createInstance(BaseInstance *&
return InstanceFactory::NoSuchVersion;
}
+ inst->init();
+
// FIXME: really, how do you even know?
return InstanceFactory::NoCreateError;
}
@@ -181,6 +184,8 @@ InstanceFactory::InstCreateError InstanceFactory::copyInstance(BaseInstance *&ne
if(inst_type == "LegacyFTB")
m_settings->set("InstanceType", "Legacy");
+ oldInstance->copy(instDir);
+
auto error = loadInstance(newInstance, instDir);
switch (error)