fix(ServerModpackCompletionTask): 修复已禁用模组仍被下载的问题 (#5333)

This commit is contained in:
Luo Chen
2026-02-02 20:35:23 +08:00
committed by GitHub
parent 5c2bb1cc25
commit 0fc8222e63

View File

@@ -142,10 +142,14 @@ public class ServerModpackCompletionTask extends Task<Void> {
}
boolean download;
if (!files.containsKey(file.getPath()) ||
modsDirectory.equals(actualPath.getParent())
&& Files.notExists(actualPath.resolveSibling(fileName + ModManager.DISABLED_EXTENSION))
&& Files.notExists(actualPath.resolveSibling(fileName + ModManager.OLD_EXTENSION))) {
boolean isModDisabled = modsDirectory.equals(actualPath.getParent()) &&
(Files.exists(actualPath.resolveSibling(fileName + ModManager.DISABLED_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
download = true;
} else if (!Files.exists(actualPath)) {