From 5ec4cbf1cbf660d992ddd73c67d31de27c097f54 Mon Sep 17 00:00:00 2001 From: Rachel Powers <508861+Ryex@users.noreply.github.com> Date: Wed, 3 May 2023 20:31:15 -0700 Subject: [PATCH] fix add an addtion lax file name match with ` ` replaced with `+` Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com> --- launcher/ui/dialogs/BlockedModsDialog.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/launcher/ui/dialogs/BlockedModsDialog.cpp b/launcher/ui/dialogs/BlockedModsDialog.cpp index ba453df6..3e1137c2 100644 --- a/launcher/ui/dialogs/BlockedModsDialog.cpp +++ b/launcher/ui/dialogs/BlockedModsDialog.cpp @@ -305,6 +305,9 @@ bool BlockedModsDialog::checkValidPath(QString path) QString laxFilename(filename); laxFilename.replace('+', ' '); + QString laxFilename2(filename); + laxFilename.replace(' ', '+'); + auto compare = [](QString fsfilename, QString metadataFilename) { return metadataFilename.compare(fsfilename, Qt::CaseInsensitive) == 0; }; @@ -314,7 +317,7 @@ bool BlockedModsDialog::checkValidPath(QString path) qDebug() << "[Blocked Mods Dialog] Name match found:" << mod.name << "| From path:" << path; return true; } - if (compare(laxFilename, mod.name)) { + if (compare(laxFilename, mod.name) || compare(laxFilename2, mod.name)) { qDebug() << "[Blocked Mods Dialog] Lax name match found:" << mod.name << "| From path:" << path; return true; }