Fixed not automatically downloading a new version file when it is malformed

This commit is contained in:
huangyuhui 2017-02-13 22:07:58 +08:00
parent 0a2129aeab
commit 55b36e734d

View File

@ -122,7 +122,7 @@ public class MinecraftVersionManager extends IMinecraftProvider {
} catch (JsonSyntaxException | IOException e) {
HMCLog.warn("Found wrong format json, try to fix it.", e);
if (MessageBox.show(C.i18n("launcher.versions_json_not_formatted", id), MessageBox.YES_NO_OPTION) == MessageBox.YES_OPTION) {
service.download().downloadMinecraftVersionJson(id);
TaskWindow.factory().execute(service.download().downloadMinecraftVersionJson(id));
try {
mcVersion = C.GSON.fromJson(FileUtils.read(jsonFile), MinecraftVersion.class);
if (mcVersion == null)