fix(ServerModpackCompletionTask): 修复已禁用模组仍被下载的问题 (#5333)
This commit is contained in:
@@ -142,10 +142,14 @@ public class ServerModpackCompletionTask extends Task<Void> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
boolean download;
|
boolean download;
|
||||||
if (!files.containsKey(file.getPath()) ||
|
|
||||||
modsDirectory.equals(actualPath.getParent())
|
boolean isModDisabled = modsDirectory.equals(actualPath.getParent()) &&
|
||||||
&& Files.notExists(actualPath.resolveSibling(fileName + ModManager.DISABLED_EXTENSION))
|
(Files.exists(actualPath.resolveSibling(fileName + ModManager.DISABLED_EXTENSION)) ||
|
||||||
&& Files.notExists(actualPath.resolveSibling(fileName + ModManager.OLD_EXTENSION))) {
|
Files.exists(actualPath.resolveSibling(fileName + ModManager.OLD_EXTENSION)));
|
||||||
|
|
||||||
|
if (isModDisabled) {
|
||||||
|
download = false;
|
||||||
|
} else if (!files.containsKey(file.getPath())) {
|
||||||
// If old modpack does not have this entry, download it
|
// If old modpack does not have this entry, download it
|
||||||
download = true;
|
download = true;
|
||||||
} else if (!Files.exists(actualPath)) {
|
} else if (!Files.exists(actualPath)) {
|
||||||
|
|||||||
Reference in New Issue
Block a user