summaryrefslogtreecommitdiffstats
path: root/bfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'bfs.c')
-rw-r--r--bfs.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bfs.c b/bfs.c
index 1383589..359df63 100644
--- a/bfs.c
+++ b/bfs.c
@@ -873,7 +873,7 @@ static int cmdline_callback(const char *fpath, const struct BFTW *ftwbuf, void *
state.ret = BFTW_SKIP_SUBTREE;
}
- if (ftwbuf->level >= cl->mindepth) {
+ if (ftwbuf->level >= cl->mindepth && ftwbuf->level <= cl->maxdepth) {
cl->expr->eval(cl->expr, &state);
}