diff options
-rw-r--r-- | cmd_attr.c | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -16,6 +16,11 @@ static void propagate_recurse(int dirfd) DIR *dir = fdopendir(dirfd); struct dirent *d; + if (!dir) { + fprintf(stderr, "fdopendir() error: %m\n"); + return; + } + while ((errno = 0), (d = readdir(dir))) { if (!strcmp(d->d_name, ".") || !strcmp(d->d_name, "..")) |