mlist: extract DT_* handling, follow symlinks

Closes #172.
pull/173/head
Leah Neukirchen 4 years ago
parent 8d611a8a3d
commit 079e423438

@ -145,7 +145,7 @@ listdir(char *dir)
for (bpos = 0; bpos < nread; bpos += d->d_reclen) {
d = (struct linux_dirent64 *)(buf + bpos);
if (d->d_type != DT_REG && d->d_type != DT_UNKNOWN)
if (!MAIL_DT(d->d_type))
continue;
if (d->d_name[0] == '.')
continue;
@ -166,7 +166,7 @@ listdir(char *dir)
if (!fd)
return;
while ((d = readdir(fd))) {
if (d->d_type != DT_REG && d->d_type != DT_UNKNOWN)
if (!MAIL_DT(d->d_type))
continue;
if (d->d_name[0] == '.')
continue;

Loading…
Cancel
Save