mirror of
https://github.com/HMCL-dev/HMCL.git
synced 2024-11-27 06:10:08 +08:00
try to fix mis-loading library problem
This commit is contained in:
parent
8b1ff94c5f
commit
2f97cd8104
@ -56,13 +56,15 @@ public class MinecraftLibrary extends IMinecraftLibrary {
|
||||
@Override
|
||||
public boolean allow() {
|
||||
if (rules != null) {
|
||||
String action = "disallow";
|
||||
boolean flag = false;
|
||||
for (Rules r : rules)
|
||||
if (r.action() != null)
|
||||
action = r.action();
|
||||
return "allow".equals(action);
|
||||
}
|
||||
return true;
|
||||
if ("disallow".equals(r.action()))
|
||||
return false;
|
||||
else if ("allow".equals(r.action()))
|
||||
flag = true;
|
||||
return flag;
|
||||
} else
|
||||
return true;
|
||||
}
|
||||
|
||||
private String formatArch(String nati) {
|
||||
|
@ -36,7 +36,7 @@ public class Rules {
|
||||
}
|
||||
|
||||
public String action() {
|
||||
return os != null && os.isCurrentOS() ? action : null;
|
||||
return os == null || os != null && os.isCurrentOS() ? action : null;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user