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:
parent
0987507ef5
commit
21d0278887
|
|
@ -2420,10 +2420,13 @@ char **GetDirectoryFiles(const char *dirPath, int *fileCount)
|
|||
// That way we can allocate required memory, instead of a limited pool
|
||||
|
||||
while ((entity = readdir(dir)) != NULL)
|
||||
{
|
||||
if (entity->d_name != NULL && entity->d_name[0] != '.')
|
||||
{
|
||||
strcpy(dirFilesPath[counter], entity->d_name);
|
||||
counter++;
|
||||
}
|
||||
}
|
||||
|
||||
closedir(dir);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user