summaryrefslogtreecommitdiff
path: root/src/client/client.cpp
diff options
context:
space:
mode:
authorSmallJoker <mk939@ymail.com>2021-07-17 16:44:06 +0200
committerSmallJoker <mk939@ymail.com>2021-07-17 16:44:06 +0200
commit40bee27e5603a2ed1aff3646fa62661aef55c08a (patch)
tree5368e9b874a1e3b763ea4f4435e81789bb8fb1bd /src/client/client.cpp
parentf4d8cc0f0bf33a998aa0d6d95de4b34f69fb31db (diff)
downloadminetest-40bee27e5603a2ed1aff3646fa62661aef55c08a.tar.gz
minetest-40bee27e5603a2ed1aff3646fa62661aef55c08a.tar.bz2
minetest-40bee27e5603a2ed1aff3646fa62661aef55c08a.zip
CSM: Do not index files within hidden directories
CSM would previously scan for files within .git or .svn directories, and also special files such as .gitignore
Diffstat (limited to 'src/client/client.cpp')
-rw-r--r--src/client/client.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/client/client.cpp b/src/client/client.cpp
index 00ae8f6b8..17661c242 100644
--- a/src/client/client.cpp
+++ b/src/client/client.cpp
@@ -210,6 +210,9 @@ void Client::scanModSubfolder(const std::string &mod_name, const std::string &mo
std::string full_path = mod_path + DIR_DELIM + mod_subpath;
std::vector<fs::DirListNode> mod = fs::GetDirListing(full_path);
for (const fs::DirListNode &j : mod) {
+ if (j.name[0] == '.')
+ continue;
+
if (j.dir) {
scanModSubfolder(mod_name, mod_path, mod_subpath + j.name + DIR_DELIM);
continue;