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
|
|
@ -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);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user