File tree Expand file tree Collapse file tree 1 file changed +8
-4
lines changed
HMCLCore/src/main/java/org/jackhuang/hmcl/mod/server Expand file tree Collapse file tree 1 file changed +8
-4
lines changed Original file line number Diff line number Diff line change @@ -142,10 +142,14 @@ public void execute() throws Exception {
142142 }
143143
144144 boolean download ;
145- if (!files .containsKey (file .getPath ()) ||
146- modsDirectory .equals (actualPath .getParent ())
147- && Files .notExists (actualPath .resolveSibling (fileName + ModManager .DISABLED_EXTENSION ))
148- && Files .notExists (actualPath .resolveSibling (fileName + ModManager .OLD_EXTENSION ))) {
145+
146+ boolean isModDisabled = modsDirectory .equals (actualPath .getParent ()) &&
147+ (Files .exists (actualPath .resolveSibling (fileName + ModManager .DISABLED_EXTENSION )) ||
148+ Files .exists (actualPath .resolveSibling (fileName + ModManager .OLD_EXTENSION )));
149+
150+ if (isModDisabled ) {
151+ download = false ;
152+ } else if (!files .containsKey (file .getPath ())) {
149153 // If old modpack does not have this entry, download it
150154 download = true ;
151155 } else if (!Files .exists (actualPath )) {
You can’t perform that action at this time.
0 commit comments