Fix 'DefaultGameRepository::getVersionJar'

This commit is contained in:
Glavo 2022-01-02 14:25:46 +08:00 committed by Yuhui Huang
parent 836c7769f6
commit 256f72dd08

View File

@ -136,10 +136,6 @@ public class DefaultGameRepository implements GameRepository {
@Override
public File getVersionJar(Version version) {
Version v = version.resolve(this);
File currentVersionJar = new File(getVersionRoot(v.getId()), v.getId() + ".jar");
if (currentVersionJar.exists()) {
return currentVersionJar;
}
String id = Optional.ofNullable(v.getJar()).orElse(v.getId());
return new File(getVersionRoot(id), id + ".jar");
}