diff options
Diffstat (limited to 'logic')
-rw-r--r-- | logic/minecraft/MinecraftVersionList.cpp | 1 | ||||
-rw-r--r-- | logic/minecraft/OneSixProfileStrategy.cpp | 22 |
2 files changed, 12 insertions, 11 deletions
diff --git a/logic/minecraft/MinecraftVersionList.cpp b/logic/minecraft/MinecraftVersionList.cpp index 90ef5ebe..c20534e9 100644 --- a/logic/minecraft/MinecraftVersionList.cpp +++ b/logic/minecraft/MinecraftVersionList.cpp @@ -599,6 +599,7 @@ void MinecraftVersionList::saveCachedList() QJsonObject entryObj; entryObj.insert("id", mcversion->descriptor()); + entryObj.insert("version", mcversion->descriptor()); entryObj.insert("time", mcversion->m_updateTimeString); entryObj.insert("releaseTime", mcversion->m_releaseTimeString); entryObj.insert("type", mcversion->m_type); diff --git a/logic/minecraft/OneSixProfileStrategy.cpp b/logic/minecraft/OneSixProfileStrategy.cpp index b7ba2bf6..cd8fd976 100644 --- a/logic/minecraft/OneSixProfileStrategy.cpp +++ b/logic/minecraft/OneSixProfileStrategy.cpp @@ -275,19 +275,19 @@ bool OneSixProfileStrategy::customizePatch(ProfilePatchPtr patch) { return false; } - QSaveFile jsonFile(filename); - if(!jsonFile.open(QIODevice::WriteOnly)) - { - return false; - } - auto document = patch->toJson(true); - jsonFile.write(document.toJson()); - if(!jsonFile.commit()) - { - return false; - } try { + QSaveFile jsonFile(filename); + if(!jsonFile.open(QIODevice::WriteOnly)) + { + return false; + } + auto document = patch->toJson(true); + jsonFile.write(document.toJson()); + if(!jsonFile.commit()) + { + return false; + } load(); } catch (VersionIncomplete &error) |