Skip to content

Commit

Permalink
Compare content files and archives case insensitively when matching e…
Browse files Browse the repository at this point in the history
…xisting profiles
  • Loading branch information
Assumeru committed Oct 21, 2024
1 parent cdf7bd7 commit 6d182dc
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions components/config/launchersettings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 6d182dc

Please sign in to comment.