about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--seq.c8
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);