2
0
mirror of https://github.com/HMCL-dev/HMCL.git synced 2025-02-23 17:19:44 +08:00

Fix Minecraft jar does not exist when renaming a version

This commit is contained in:
huanghongxun 2018-09-19 00:12:44 +08:00
parent 67b6a60382
commit d426952d47

View File

@ -140,6 +140,8 @@ public class DefaultGameRepository implements GameRepository {
return false;
}
if (fromVersion.getId().equals(fromVersion.getJar()))
fromVersion = fromVersion.setJar(to);
FileUtils.writeText(toJson, Constants.GSON.toJson(fromVersion.setId(to)));
return true;
} catch (IOException | JsonParseException | VersionNotFoundException e) {