aboutsummaryrefslogtreecommitdiff
path: root/src/server
diff options
context:
space:
mode:
authorDS <vorunbekannt75@web.de>2020-08-20 22:25:29 +0200
committerGitHub <noreply@github.com>2020-08-20 22:25:29 +0200
commit98faeac5a7b382e5d7ce0474bf7d52fc5975a23c (patch)
treeba08707c5b06087fe8472ed6245ace7a0683d7e2 /src/server
parent9c7340104a7ec4007e3dfe0bb4482f3c8f9878e0 (diff)
downloadminetest-98faeac5a7b382e5d7ce0474bf7d52fc5975a23c.tar.gz
minetest-98faeac5a7b382e5d7ce0474bf7d52fc5975a23c.tar.bz2
minetest-98faeac5a7b382e5d7ce0474bf7d52fc5975a23c.zip
Load media from subfolders (#9065)
Diffstat (limited to 'src/server')
-rw-r--r--src/server/mods.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/server/mods.cpp b/src/server/mods.cpp
index 6ac530739..cf1467648 100644
--- a/src/server/mods.cpp
+++ b/src/server/mods.cpp
@@ -99,10 +99,10 @@ 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) {
- paths.push_back(spec.path + DIR_DELIM + "textures");
- paths.push_back(spec.path + DIR_DELIM + "sounds");
- paths.push_back(spec.path + DIR_DELIM + "media");
- paths.push_back(spec.path + DIR_DELIM + "models");
- paths.push_back(spec.path + DIR_DELIM + "locale");
+ fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "textures");
+ fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "sounds");
+ fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "media");
+ fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "models");
+ fs::GetRecursiveDirs(paths, spec.path + DIR_DELIM + "locale");
}
}