[FIX] configure.c: Fix '.' and '..' detection

Otherwise, hidden files such as '.file.<ext>' would be ignored.
This commit is contained in:
Xavier Del Campo Romero 2024-10-17 06:44:18 +02:00
commit ecbc211003
No known key found for this signature in database
GPG key ID: 84FF3612A9BF43F2

View file

@ -293,7 +293,8 @@ collect_sources(char *dir, bool head, char *ext)
while ((ent = readdir(handle)))
{
char *name = ent->d_name;
if (*name == '.') continue;
if (!strcmp(name, ".") || !strcmp(name, "..")) continue;
if (strlen(name) > strlen(ext) &&
!strcmp(name + strlen(name) - strlen(ext), ext))