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
This commit is contained in:
SmallJoker 2021-07-17 16:44:06 +02:00
parent f4d8cc0f0b
commit 40bee27e56

@ -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::string full_path = mod_path + DIR_DELIM + mod_subpath;
std::vector<fs::DirListNode> mod = fs::GetDirListing(full_path); std::vector<fs::DirListNode> mod = fs::GetDirListing(full_path);
for (const fs::DirListNode &j : mod) { for (const fs::DirListNode &j : mod) {
if (j.name[0] == '.')
continue;
if (j.dir) { if (j.dir) {
scanModSubfolder(mod_name, mod_path, mod_subpath + j.name + DIR_DELIM); scanModSubfolder(mod_name, mod_path, mod_subpath + j.name + DIR_DELIM);
continue; continue;