diff options
author | Petr Mrázek <peterix@gmail.com> | 2013-10-10 01:47:48 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2013-10-10 01:47:48 +0200 |
commit | 73f8bc5c92cb4a9b7ce507309001c6b206b5c8eb (patch) | |
tree | da0b7c09fcd105a4144387e4261ad3aabc910862 /logic/OneSixInstance.cpp | |
parent | eaf0cbeafc5ff70bd2bb0d66b5f5980a71f824c5 (diff) | |
download | MultiMC-73f8bc5c92cb4a9b7ce507309001c6b206b5c8eb.tar MultiMC-73f8bc5c92cb4a9b7ce507309001c6b206b5c8eb.tar.gz MultiMC-73f8bc5c92cb4a9b7ce507309001c6b206b5c8eb.tar.lz MultiMC-73f8bc5c92cb4a9b7ce507309001c6b206b5c8eb.tar.xz MultiMC-73f8bc5c92cb4a9b7ce507309001c6b206b5c8eb.zip |
Version changing removes any existing version json.
Diffstat (limited to 'logic/OneSixInstance.cpp')
-rw-r--r-- | logic/OneSixInstance.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp index ad3f9f58..1b7b5bb4 100644 --- a/logic/OneSixInstance.cpp +++ b/logic/OneSixInstance.cpp @@ -192,6 +192,11 @@ bool OneSixInstance::setIntendedVersionId(QString version) { settings().set("IntendedVersion", version); setShouldUpdate(true); + auto pathCustom = PathCombine(instanceRoot(), "custom.json"); + auto pathOrig = PathCombine(instanceRoot(), "version.json"); + QFile::remove(pathCustom); + QFile::remove(pathOrig); + reloadFullVersion(); return true; } @@ -271,7 +276,11 @@ bool OneSixInstance::reloadFullVersion() d->version = version; return true; } - return false; + else + { + d->version.reset(); + return false; + } } std::shared_ptr<OneSixVersion> OneSixInstance::getFullVersion() |