Fix Minecraft jar does not exist when renaming a version
This commit is contained in:
@@ -140,6 +140,8 @@ public class DefaultGameRepository implements GameRepository {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (fromVersion.getId().equals(fromVersion.getJar()))
|
||||||
|
fromVersion = fromVersion.setJar(to);
|
||||||
FileUtils.writeText(toJson, Constants.GSON.toJson(fromVersion.setId(to)));
|
FileUtils.writeText(toJson, Constants.GSON.toJson(fromVersion.setId(to)));
|
||||||
return true;
|
return true;
|
||||||
} catch (IOException | JsonParseException | VersionNotFoundException e) {
|
} catch (IOException | JsonParseException | VersionNotFoundException e) {
|
||||||
|
|||||||
Reference in New Issue
Block a user