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:
parent
67b6a60382
commit
d426952d47
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user