mirror of
https://github.com/OpenMW/openmw.git
synced 2025-01-30 08:15:37 +00:00
Compare content files and archives case insensitively when matching existing profiles
This commit is contained in:
parent
cdf7bd74d5
commit
6d182dcdae
1 changed files with 8 additions and 5 deletions
|
@ -266,11 +266,14 @@ void Config::LauncherSettings::setContentList(const GameSettings& gameSettings)
|
|||
if (!std::ranges::equal(
|
||||
dirs, listDirs, [](const SettingValue& dir, const QString& listDir) { return dir.value == listDir; }))
|
||||
continue;
|
||||
if (files == getContentListFiles(listName) && archives == getArchiveList(listName))
|
||||
{
|
||||
setCurrentContentListName(listName);
|
||||
return;
|
||||
}
|
||||
constexpr auto compareFiles
|
||||
= [](const QString& a, const QString& b) { return a.compare(b, Qt::CaseInsensitive) == 0; };
|
||||
if (!std::ranges::equal(files, getContentListFiles(listName), compareFiles))
|
||||
continue;
|
||||
if (!std::ranges::equal(archives, getArchiveList(listName), compareFiles))
|
||||
continue;
|
||||
setCurrentContentListName(listName);
|
||||
return;
|
||||
}
|
||||
|
||||
// otherwise, add content list
|
||||
|
|
Loading…
Reference in a new issue