mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2025-09-10 04:16:02 -04:00
Fix 'DefaultGameRepository::getVersionJar'
This commit is contained in:
parent
836c7769f6
commit
256f72dd08
@ -136,10 +136,6 @@ public class DefaultGameRepository implements GameRepository {
|
|||||||
@Override
|
@Override
|
||||||
public File getVersionJar(Version version) {
|
public File getVersionJar(Version version) {
|
||||||
Version v = version.resolve(this);
|
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());
|
String id = Optional.ofNullable(v.getJar()).orElse(v.getId());
|
||||||
return new File(getVersionRoot(id), id + ".jar");
|
return new File(getVersionRoot(id), id + ".jar");
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user