diff options
Diffstat (limited to 'cftw.c')
| -rw-r--r-- | cftw.c | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -57,7 +57,12 @@ int cftw(const char *const dirpath, int (*const fn)(const char *, fprintf(stderr, "%s: stat(2) %s: %s\n", __func__, path, strerror(errno)); else if (S_ISDIR(sb.st_mode)) - ret = cftw(d.str, fn, user); + { + if ((ret = cftw(d.str, fn, user))) + ; + else if ((ret = fn(d.str, &sb, user))) + ; + } else if (S_ISREG(sb.st_mode)) ret = fn(d.str, &sb, user); else |
