diff --git a/HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/modrinth/ModrinthModpackExportTask.java b/HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/modrinth/ModrinthModpackExportTask.java index eb3a0997c8..dcfe0dc5b0 100644 --- a/HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/modrinth/ModrinthModpackExportTask.java +++ b/HMCLCore/src/main/java/org/jackhuang/hmcl/modpack/modrinth/ModrinthModpackExportTask.java @@ -21,9 +21,9 @@ import java.io.IOException; import java.nio.file.Files; import java.nio.file.Path; -import java.nio.file.Paths; import java.util.*; +import org.jackhuang.hmcl.addon.LocalAddonManager; import org.jackhuang.hmcl.addon.mod.ModManager; import org.jackhuang.hmcl.addon.repository.ModrinthRemoteAddonRepository; import org.jackhuang.hmcl.game.DefaultGameInstance; @@ -34,6 +34,7 @@ import org.jackhuang.hmcl.modpack.ModpackExportInfo; import org.jackhuang.hmcl.task.Task; import org.jackhuang.hmcl.util.DigestUtils; +import org.jackhuang.hmcl.util.StringUtils; import org.jackhuang.hmcl.util.gson.JsonUtils; import org.jackhuang.hmcl.util.io.Zipper; import org.jackhuang.hmcl.util.versioning.GameVersionNumber; @@ -93,7 +94,7 @@ public ModrinthModpackExportTask(DefaultGameInstance instance, ModpackExportInfo boolean isDisabled = modManager.isDisabled(file); if (isDisabled) { - relativePath = modManager.enableMod(Paths.get(relativePath)).toString(); + relativePath = StringUtils.removeSuffix(relativePath, LocalAddonManager.DISABLED_EXTENSION); } Optional modrinthVersion = Optional.empty();