Skip any that that starts with '.' it's ether a relative link or a hidden file on nix and should not be iterated.

This commit is contained in:
Jeffery Myers 2020-12-16 16:01:18 -08:00
parent 0987507ef5
commit 21d0278887

View File

@ -2421,8 +2421,11 @@ char **GetDirectoryFiles(const char *dirPath, int *fileCount)
while ((entity = readdir(dir)) != NULL) while ((entity = readdir(dir)) != NULL)
{ {
strcpy(dirFilesPath[counter], entity->d_name); if (entity->d_name != NULL && entity->d_name[0] != '.')
counter++; {
strcpy(dirFilesPath[counter], entity->d_name);
counter++;
}
} }
closedir(dir); closedir(dir);