aboutsummaryrefslogtreecommitdiffstats
path: root/getdtablecount.c
diff options
context:
space:
mode:
Diffstat (limited to 'getdtablecount.c')
-rw-r--r--getdtablecount.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/getdtablecount.c b/getdtablecount.c
index 5bfa5ed..1b59b38 100644
--- a/getdtablecount.c
+++ b/getdtablecount.c
@@ -16,7 +16,8 @@ getdtablecount(void)
n = 0;
while ((dp = readdir(dir)))
- n++;
+ if (dp->d_name[0] >= '0' && dp->d_name[0] <= '9')
+ n++;
closedir(dir);
return n;