Merge branch 'bsapriority' into 'master'

Files::Collections: prefer files from highest priority folders (bug #7092)

Closes #7092

See merge request OpenMW/openmw!2716
7220-lua-add-a-general-purpose-lexical-parser
psi29a 2 years ago
commit 5f1da29881

@ -35,6 +35,7 @@
Bug #7054: Quests aren't sorted by name
Bug #7084: Resurrecting an actor doesn't take into account base record changes
Bug #7088: Deleting last save game of last character doesn't clear character name/details
Bug #7092: BSA archives from higher priority directories don't take priority
Bug #7122: Teleportation to underwater should cancel active water walking effect
Bug #7172: Current music playlist continues playing indefinitely if next playlist is empty
Feature #5492: Let rain and snow collide with statics

@ -37,9 +37,9 @@ namespace Files
std::filesystem::path Collections::getPath(const std::string& file) const
{
for (const auto& mDirectorie : mDirectories)
for (auto iter = mDirectories.rbegin(); iter != mDirectories.rend(); iter++)
{
for (const auto& iter2 : std::filesystem::directory_iterator(mDirectorie))
for (const auto& iter2 : std::filesystem::directory_iterator(*iter))
{
const auto& path = iter2.path();
const auto str = Files::pathToUnicodeString(path.filename());
@ -59,9 +59,9 @@ namespace Files
bool Collections::doesExist(const std::string& file) const
{
for (const auto& mDirectorie : mDirectories)
for (auto iter = mDirectories.rbegin(); iter != mDirectories.rend(); iter++)
{
for (const auto& iter2 : std::filesystem::directory_iterator(mDirectorie))
for (const auto& iter2 : std::filesystem::directory_iterator(*iter))
{
const auto& path = iter2.path();
const auto str = Files::pathToUnicodeString(path.filename());

Loading…
Cancel
Save