修复通过自动安装更新游戏时的崩溃 (#1662)

* fix game upgrade

* fix #1459: Invalidate the version number cache before saving the version
close #1566
This commit is contained in:
Glavo
2022-08-28 16:52:26 +08:00
committed by GitHub
parent d9bdc2b1f7
commit c21671e86b
2 changed files with 4 additions and 1 deletions

View File

@@ -488,6 +488,7 @@ public class DefaultGameRepository implements GameRepository {
}
public Task<Version> saveAsync(Version version) {
this.gameVersions.remove(getVersionJar(version));
if (version.isResolvedPreservingPatches()) {
return new VersionJsonSaveTask(this, MaintainTask.maintainPreservingPatches(this, version));
} else {