]> git.lizzy.rs Git - minetest.git/commitdiff
CSM: Do not index files within hidden directories
authorSmallJoker <mk939@ymail.com>
Sat, 17 Jul 2021 14:44:06 +0000 (16:44 +0200)
committerSmallJoker <mk939@ymail.com>
Sat, 17 Jul 2021 14:44:06 +0000 (16:44 +0200)
CSM would previously scan for files within .git or .svn directories, and also special files such as .gitignore

src/client/client.cpp

index 00ae8f6b8bff8a40e0c40f3bd75f4382f34e1678..17661c2421daea99821362e2904626c805281507 100644 (file)
@@ -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;