diff options
author | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-26 12:34:57 +0100 |
---|---|---|
committer | Christian Neukirchen <chneukirchen@gmail.com> | 2016-02-26 12:34:57 +0100 |
commit | b2bfdf1c9f7fa149790eda8bb51dda56412d6b80 (patch) | |
tree | fc377daf68ef59e8c46cdc2326cfef6d5249f7d8 /lr.c | |
parent | ff571c5ca19b74869d05f352a2afae00781d87cc (diff) | |
download | lr-b2bfdf1c9f7fa149790eda8bb51dda56412d6b80.tar.gz lr-b2bfdf1c9f7fa149790eda8bb51dda56412d6b80.tar.xz lr-b2bfdf1c9f7fa149790eda8bb51dda56412d6b80.zip |
do not count . and .. as entries
Diffstat (limited to 'lr.c')
-rw-r--r-- | lr.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lr.c b/lr.c index e6265c3..ee3119a 100644 --- a/lr.c +++ b/lr.c @@ -1654,11 +1654,11 @@ recurse(char *path, struct history *h) if (d) { struct dirent *de; while ((de = readdir(d))) { - entries++; if (de->d_name[0] == '.' && (!de->d_name[1] || (de->d_name[1]=='.' && !de->d_name[2]))) continue; + entries++; if (strlen(de->d_name) >= PATH_MAX-l) { errno = ENAMETOOLONG; closedir(d); |