summaryrefslogtreecommitdiffstats
path: root/api/logic/minecraft/onesix/OneSixInstance.cpp
diff options
context:
space:
mode:
authorPetr Mrázek <peterix@gmail.com>2017-01-10 23:03:00 +0100
committerPetr Mrázek <peterix@gmail.com>2017-01-10 23:03:00 +0100
commit858b490c74d4b560923b1b3896735d0a42c78991 (patch)
treea423f01a3e38cf75a26cab99da23228086cd9281 /api/logic/minecraft/onesix/OneSixInstance.cpp
parent12c3683ec07788bf4be03221b0232b4eae27caba (diff)
downloadMultiMC-858b490c74d4b560923b1b3896735d0a42c78991.tar
MultiMC-858b490c74d4b560923b1b3896735d0a42c78991.tar.gz
MultiMC-858b490c74d4b560923b1b3896735d0a42c78991.tar.lz
MultiMC-858b490c74d4b560923b1b3896735d0a42c78991.tar.xz
MultiMC-858b490c74d4b560923b1b3896735d0a42c78991.zip
GH-1778: Fix placement of modded Minecraft.jar in OneSix instances.
Diffstat (limited to 'api/logic/minecraft/onesix/OneSixInstance.cpp')
-rw-r--r--api/logic/minecraft/onesix/OneSixInstance.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/api/logic/minecraft/onesix/OneSixInstance.cpp b/api/logic/minecraft/onesix/OneSixInstance.cpp
index 1bc0eb77..b471ff3e 100644
--- a/api/logic/minecraft/onesix/OneSixInstance.cpp
+++ b/api/logic/minecraft/onesix/OneSixInstance.cpp
@@ -156,7 +156,7 @@ QString OneSixInstance::mainJarPath() const
auto jarMods = getJarMods();
if (!jarMods.isEmpty())
{
- return QDir(instanceRoot()).absoluteFilePath("minecraft.jar");
+ return QDir(binRoot()).absoluteFilePath("minecraft.jar");
}
else
{
@@ -392,7 +392,11 @@ std::shared_ptr<Task> OneSixInstance::createJarModdingTask()
{
tempJar.remove();
}
- auto finalJarPath = QDir(m_inst->instanceRoot()).absoluteFilePath("minecraft.jar");
+ if(!FS::ensureFolderPathExists(m_inst->binRoot()))
+ {
+ emitFailed(tr("Couldn't create the bin folder for Minecraft.jar"));
+ }
+ auto finalJarPath = QDir(m_inst->binRoot()).absoluteFilePath("minecraft.jar");
QFile finalJar(finalJarPath);
if(finalJar.exists())
{