diff --git a/CHANGELOG.md b/CHANGELOG.md index f587fffcc9..9185e2d49e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/components/files/collections.cpp b/components/files/collections.cpp index b556ab06b0..47734bb084 100644 --- a/components/files/collections.cpp +++ b/components/files/collections.cpp @@ -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());