forked from Telodendria/Telodendria
Apply #52: d_namlen is non-standard.
This commit is contained in:
parent
7a951c980f
commit
d6f96757bc
1 changed files with 3 additions and 2 deletions
5
src/Db.c
5
src/Db.c
|
@ -831,9 +831,10 @@ DbList(Db * db, size_t nArgs,...)
|
|||
}
|
||||
while ((file = readdir(files)))
|
||||
{
|
||||
if (file->d_type == DT_REG && file->d_namlen > 5)
|
||||
size_t namlen = strlen(file->d_name);
|
||||
if (file->d_type == DT_REG && namlen > 5)
|
||||
{
|
||||
int nameOffset = file->d_namlen - 5;
|
||||
int nameOffset = namlen - 5;
|
||||
|
||||
if (strcmp(file->d_name + nameOffset, ".json") == 0)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue