aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/directory.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/directory.c b/src/directory.c
index eb076d94d..515b07e7d 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -188,12 +188,12 @@ directory_walk(struct directory *directory,
return false;
}
- if (visitor->directory != NULL) {
- const struct dirvec *dv = &directory->children;
- for (size_t i = 0; i < dv->nr; ++i)
- if (!directory_walk(dv->base[i], visitor, ctx,
- error_r))
- return false;
+ const struct dirvec *dv = &directory->children;
+ for (size_t i = 0; i < dv->nr; ++i) {
+ struct directory *child = dv->base[i];
+
+ if (!directory_walk(child, visitor, ctx, error_r))
+ return false;
}
return true;