From 21d027888788292c48c01655fb7959bc6d5f2bad Mon Sep 17 00:00:00 2001 From: Jeffery Myers Date: Wed, 16 Dec 2020 16:01:18 -0800 Subject: [PATCH] Skip any that that starts with '.' it's ether a relative link or a hidden file on nix and should not be iterated. --- src/core.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core.c b/src/core.c index 5ee787794..59544e0cb 100644 --- a/src/core.c +++ b/src/core.c @@ -2421,8 +2421,11 @@ char **GetDirectoryFiles(const char *dirPath, int *fileCount) while ((entity = readdir(dir)) != NULL) { - strcpy(dirFilesPath[counter], entity->d_name); - counter++; + if (entity->d_name != NULL && entity->d_name[0] != '.') + { + strcpy(dirFilesPath[counter], entity->d_name); + counter++; + } } closedir(dir);