From 6558b3b2f99da5537b25cd40dd5dd98909396d59 Mon Sep 17 00:00:00 2001 From: Calboot Date: Sun, 30 Nov 2025 21:27:59 +0800 Subject: [PATCH] =?UTF-8?q?[Bugfix]=20#4863:=20macOS=20=E4=B8=8A=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=9A=84=20Modrinth=20=E6=95=B4=E5=90=88=E5=8C=85?= =?UTF-8?q?=E9=BB=98=E8=AE=A4=E6=96=87=E4=BB=B6=E5=90=8D=E7=A7=B0=20(#4864?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes #4863 --- .../java/org/jackhuang/hmcl/ui/export/ModpackInfoPage.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/HMCL/src/main/java/org/jackhuang/hmcl/ui/export/ModpackInfoPage.java b/HMCL/src/main/java/org/jackhuang/hmcl/ui/export/ModpackInfoPage.java index 2cdaa1f53..59ccf6191 100644 --- a/HMCL/src/main/java/org/jackhuang/hmcl/ui/export/ModpackInfoPage.java +++ b/HMCL/src/main/java/org/jackhuang/hmcl/ui/export/ModpackInfoPage.java @@ -45,6 +45,7 @@ import org.jackhuang.hmcl.util.SettingsMap; import org.jackhuang.hmcl.util.StringUtils; import org.jackhuang.hmcl.util.io.FileUtils; import org.jackhuang.hmcl.util.io.JarUtils; +import org.jackhuang.hmcl.util.platform.OperatingSystem; import org.jackhuang.hmcl.util.platform.SystemInfo; import java.nio.file.Path; @@ -108,9 +109,9 @@ public final class ModpackInfoPage extends Control implements WizardPage { private void onNext() { FileChooser fileChooser = new FileChooser(); fileChooser.setTitle(i18n("modpack.wizard.step.initialization.save")); - if (controller.getSettings().get(MODPACK_TYPE) == ModpackTypeSelectionPage.MODPACK_TYPE_MODRINTH) { + if (controller.getSettings().get(MODPACK_TYPE) == MODPACK_TYPE_MODRINTH) { fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(i18n("modpack"), "*.mrpack")); - fileChooser.setInitialFileName(name.get() + ".mrpack"); + fileChooser.setInitialFileName(name.get() + (OperatingSystem.CURRENT_OS == OperatingSystem.MACOS ? "" : ".mrpack")); } else { fileChooser.getExtensionFilters().add(new FileChooser.ExtensionFilter(i18n("modpack"), "*.zip")); fileChooser.setInitialFileName(name.get() + ".zip");