From 2ea20a8b29808308ce4b23b223457b3ebfb55174 Mon Sep 17 00:00:00 2001 From: flow Date: Sat, 11 Jun 2022 07:12:59 -0300 Subject: [PATCH] fix: allow discovering mrpacks in languages without dot --- launcher/ui/pages/modplatform/ImportPage.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/launcher/ui/pages/modplatform/ImportPage.cpp b/launcher/ui/pages/modplatform/ImportPage.cpp index b3ed1b73..2ad7881d 100644 --- a/launcher/ui/pages/modplatform/ImportPage.cpp +++ b/launcher/ui/pages/modplatform/ImportPage.cpp @@ -114,7 +114,7 @@ void ImportPage::updateState() // Allow non-latin people to use ZIP files! auto zip = QMimeDatabase().mimeTypeForUrl(url).suffixes().contains("zip"); - if(fi.exists() && (zip || fi.suffix() == "mrpack")) + if(fi.exists() && (zip || fi.suffix() == "mrpack" || fi.fileName().endsWith("mrpack"))) { QFileInfo fi(url.fileName()); dialog->setSuggestedPack(fi.completeBaseName(), new InstanceImportTask(url,this)); @@ -149,7 +149,7 @@ void ImportPage::setUrl(const QString& url) void ImportPage::on_modpackBtn_clicked() { auto filter = QMimeDatabase().mimeTypeForName("application/zip").filterString(); - filter += ";;" + tr("Modrinth pack (*.mrpack)"); + filter += ";;" + tr("Modrinth pack (*.mrpack *mrpack)"); const QUrl url = QFileDialog::getOpenFileUrl(this, tr("Choose modpack"), modpackUrl(), filter); if (url.isValid()) {