From 6dd0799aab88c1e923141b249f90fd728324e1f3 Mon Sep 17 00:00:00 2001 From: Leah Neukirchen Date: Sun, 8 Mar 2020 17:16:50 +0100 Subject: mdirs: extract DT_* handling --- mdirs.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'mdirs.c') diff --git a/mdirs.c b/mdirs.c index 68b7e3f..46b2426 100644 --- a/mdirs.c +++ b/mdirs.c @@ -8,6 +8,7 @@ #include #include "blaze822.h" +#include "blaze822_priv.h" static char sep = '\n'; int aflag; @@ -47,10 +48,9 @@ mdirs(char *fpath) } while ((d = readdir(dir))) { -#if defined(DT_DIR) && defined(DT_UNKNOWN) - if (d->d_type != DT_DIR && d->d_type != DT_UNKNOWN) + if (!DIR_DT(d->d_type)) continue; -#endif + if (d->d_name[0] == '.' && d->d_name[1] == 0) continue; -- cgit 1.4.1