aboutsummaryrefslogtreecommitdiff
path: root/src/server/mods.cpp
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2021-02-23 19:39:15 +0100
committerGitHub <noreply@github.com>2021-02-23 19:39:15 +0100
commit4abe4b87b5902bff229505b83b9bddb9a8f759cd (patch)
tree7c90751b6c17fdc380a9c1f28db9cdbccd8978bb /src/server/mods.cpp
parent29681085b9762e8cf0e953014ca0e8d2890713ef (diff)
downloadminetest-4abe4b87b5902bff229505b83b9bddb9a8f759cd.tar.gz
minetest-4abe4b87b5902bff229505b83b9bddb9a8f759cd.tar.bz2
minetest-4abe4b87b5902bff229505b83b9bddb9a8f759cd.zip
Allow overwriting media files of dependencies (#10752)
Diffstat (limited to 'src/server/mods.cpp')
-rw-r--r--src/server/mods.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/server/mods.cpp b/src/server/mods.cpp
index cf1467648..83fa12da9 100644
--- a/src/server/mods.cpp
+++ b/src/server/mods.cpp
@@ -98,7 +98,8 @@ void ServerModManager::getModNames(std::vector<std::string> &modlist) const
void ServerModManager::getModsMediaPaths(std::vector<std::string> &paths) const
{
- for (const ModSpec &spec : m_sorted_mods) {
+ for (auto it = m_sorted_mods.crbegin(); it != m_sorted_mods.crend(); it++) {
+ const ModSpec &spec = *it;
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "textures");
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "sounds");
fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "media");