diff options
author | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-03 20:31:15 -0700 |
---|---|---|
committer | Rachel Powers <508861+Ryex@users.noreply.github.com> | 2023-05-03 20:31:15 -0700 |
commit | 5ec4cbf1cbf660d992ddd73c67d31de27c097f54 (patch) | |
tree | 10ba4cf176a8b5e46d91b4c36bc2b9beb2b309d1 /launcher/ui/dialogs | |
parent | 64ba5e4ed1456bed159cfe7b41ed9175b8baf5c4 (diff) | |
download | PrismLauncher-5ec4cbf1cbf660d992ddd73c67d31de27c097f54.tar.gz PrismLauncher-5ec4cbf1cbf660d992ddd73c67d31de27c097f54.tar.bz2 PrismLauncher-5ec4cbf1cbf660d992ddd73c67d31de27c097f54.zip |
fix add an addtion lax file name match with ` ` replaced with `+`
Signed-off-by: Rachel Powers <508861+Ryex@users.noreply.github.com>
Diffstat (limited to 'launcher/ui/dialogs')
-rw-r--r-- | launcher/ui/dialogs/BlockedModsDialog.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
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; } |