about summary refs log tree commit diff
path: root/mlist.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2020-03-08 17:20:37 +0100
committerLeah Neukirchen <leah@vuxu.org>2020-03-08 17:20:37 +0100
commit079e423438a745849ee530bb7b87dff244d6b88f (patch)
treecf2aabffbfa7d89108aaa547696e02dffc730885 /mlist.c
parent8d611a8a3d193779f077e83484f618267e98eba5 (diff)
downloadmblaze-079e423438a745849ee530bb7b87dff244d6b88f.tar.gz
mblaze-079e423438a745849ee530bb7b87dff244d6b88f.tar.xz
mblaze-079e423438a745849ee530bb7b87dff244d6b88f.zip
mlist: extract DT_* handling, follow symlinks
Closes #172.
Diffstat (limited to 'mlist.c')
-rw-r--r--mlist.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mlist.c b/mlist.c
index 6fcfb66..65ed485 100644
--- a/mlist.c
+++ b/mlist.c
@@ -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;