diff options
author | Leah Neukirchen <leah@vuxu.org> | 2020-03-08 17:20:23 +0100 |
---|---|---|
committer | Leah Neukirchen <leah@vuxu.org> | 2020-03-08 17:20:23 +0100 |
commit | dfc18e0040c64fac0318cc9c5964e3a923fa8029 (patch) | |
tree | ea93fedf713fb3199dc072497573fe27b2b7c61b /seq.c | |
parent | 48b490f3793ec438a7fa15ae249d98e4871d34cd (diff) | |
download | mblaze-dfc18e0040c64fac0318cc9c5964e3a923fa8029.tar.gz mblaze-dfc18e0040c64fac0318cc9c5964e3a923fa8029.tar.xz mblaze-dfc18e0040c64fac0318cc9c5964e3a923fa8029.zip |
seq: extract DT_* handling, follow symlinks
Diffstat (limited to 'seq.c')
-rw-r--r-- | seq.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/seq.c b/seq.c index c1f0694..6ae7dad 100644 --- a/seq.c +++ b/seq.c @@ -501,12 +501,8 @@ iterdir(char *dir, void (*cb)(char *)) long i = 0; for (i = 0; i < n; i++) { - if (namelist[i]->d_name[0] != '.') -#if defined(DT_REG) && defined(DT_UNKNOWN) - if (namelist[i]->d_type == DT_REG || - namelist[i]->d_type == DT_UNKNOWN) -#endif - { + if (namelist[i]->d_name[0] != '.' && + MAIL_DT(namelist[i]->d_type)) { snprintf(sub, sizeof sub, "%s%s/%s", dir, m, namelist[i]->d_name); cb(sub); |