diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-08-12 00:39:19 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-08-12 00:39:19 +0200 |
commit | ff33d4a1a48abf1442cde77c2253f071d0870d50 (patch) | |
tree | 7846f144b2ee2e24574745847c0f921677021d73 /backend/OneSixUpdate.cpp | |
parent | 7e78a422e8bb22572706b7fadb58fc45e7b8a7db (diff) | |
download | MultiMC-ff33d4a1a48abf1442cde77c2253f071d0870d50.tar MultiMC-ff33d4a1a48abf1442cde77c2253f071d0870d50.tar.gz MultiMC-ff33d4a1a48abf1442cde77c2253f071d0870d50.tar.lz MultiMC-ff33d4a1a48abf1442cde77c2253f071d0870d50.tar.xz MultiMC-ff33d4a1a48abf1442cde77c2253f071d0870d50.zip |
OneSix instances now have a minecraft folder inside.
Also, the main instance view was expanded with helpful key events:
F2 for rename, F5 for refresh, Enter for start instance, Delete for...
Diffstat (limited to 'backend/OneSixUpdate.cpp')
-rw-r--r-- | backend/OneSixUpdate.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/backend/OneSixUpdate.cpp b/backend/OneSixUpdate.cpp index 5506d9aa..5cd2c78c 100644 --- a/backend/OneSixUpdate.cpp +++ b/backend/OneSixUpdate.cpp @@ -38,6 +38,15 @@ OneSixUpdate::OneSixUpdate(BaseInstance *inst, QObject *parent):BaseUpdate(inst, void OneSixUpdate::executeTask() { QString intendedVersion = m_inst->intendedVersionId(); + + // Make directories + QDir mcDir(m_inst->minecraftRoot()); + if (!mcDir.exists() && !mcDir.mkpath(".")) + { + emitFailed("Failed to create bin folder."); + return; + } + // Get a pointer to the version object that corresponds to the instance's version. targetVersion = MinecraftVersionList::getMainList().findVersion(intendedVersion).dynamicCast<MinecraftVersion>(); if(targetVersion == nullptr) @@ -78,7 +87,7 @@ void OneSixUpdate::versionFileFinished() auto DlJob = firstJob.dynamicCast<DownloadJob>(); QString version_id = targetVersion->descriptor; - QString inst_dir = m_inst->rootDir(); + QString inst_dir = m_inst->instanceRoot(); // save the version file in $instanceId/version.json { QString version1 = PathCombine(inst_dir, "/version.json"); |