summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/profile.cpp11
1 files changed, 10 insertions, 1 deletions
diff --git a/src/profile.cpp b/src/profile.cpp
index 3cc1a2a3..5a71cacb 100644
--- a/src/profile.cpp
+++ b/src/profile.cpp
@@ -410,9 +410,18 @@ void Profile::refreshModStatus()
} else {
namesRead.insert(lookupName);
}
- unsigned int modIndex = ModInfo::getIndex(lookupName);
+ unsigned int modIndex = ModInfo::findMod(
+ [lookupName](ModInfo::Ptr info) {
+ return info->name().compare(lookupName, Qt::CaseInsensitive) == 0;
+ }
+ );
if (modIndex != UINT_MAX) {
ModInfo::Ptr info = ModInfo::getByIndex(modIndex);
+ if (info->name().compare(lookupName) != 0) {
+ // name in modlist.txt doesn't match case of actual folder
+ // need to rewrite the modlist to fix this
+ modStatusModified = true;
+ }
if ((modIndex < m_ModStatus.size())
&& (info->getFixedPriority() == INT_MIN)) {
m_ModStatus[modIndex].m_Enabled = enabled;