diff options
author | Petr Mrázek <peterix@gmail.com> | 2014-05-13 23:57:34 +0200 |
---|---|---|
committer | Petr Mrázek <peterix@gmail.com> | 2014-06-09 01:38:31 +0200 |
commit | 55a0d110b654a93ef1bb9ee50a6f02ecaec7f88d (patch) | |
tree | 5957085e7e33d0b8f85859f421c1571b0ae6f978 /logic/OneSixInstance.cpp | |
parent | f3900f2966e8c211fee51ece156da054df2d47c7 (diff) | |
download | PrismLauncher-55a0d110b654a93ef1bb9ee50a6f02ecaec7f88d.tar.gz PrismLauncher-55a0d110b654a93ef1bb9ee50a6f02ecaec7f88d.tar.bz2 PrismLauncher-55a0d110b654a93ef1bb9ee50a6f02ecaec7f88d.zip |
Lock down the version cache. Just enough to make it annoying to corrupt the files.
Diffstat (limited to 'logic/OneSixInstance.cpp')
-rw-r--r-- | logic/OneSixInstance.cpp | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/logic/OneSixInstance.cpp b/logic/OneSixInstance.cpp index 574dfc69..fc53bd39 100644 --- a/logic/OneSixInstance.cpp +++ b/logic/OneSixInstance.cpp @@ -24,6 +24,7 @@ #include "logic/OneSixInstance_p.h" #include "logic/OneSixUpdate.h" #include "logic/minecraft/VersionFinal.h" +#include "minecraft/VersionBuildError.h" #include "logic/assets/AssetsUtils.h" #include "icons/IconList.h" @@ -42,21 +43,13 @@ OneSixInstance::OneSixInstance(const QString &rootDir, SettingsObject *settings, void OneSixInstance::init() { - // FIXME: why is this decided here? what does this even mean? - if (QDir(instanceRoot()).exists("version.json")) + try { - try - { - reloadVersion(); - } - catch (MMCError &e) - { - // QLOG_ERROR() << "Caught exception on instance init: " << e.cause(); - } + reloadVersion(); } - else + catch (MMCError &e) { - clearVersion(); + QLOG_ERROR() << "Caught exception on instance init: " << e.cause(); } } @@ -389,6 +382,10 @@ void OneSixInstance::reloadVersion() d->m_flags.remove(VersionBrokenFlag); emit versionReloaded(); } + catch (VersionIncomplete & error) + { + + } catch (MMCError &error) { d->version->clear(); |