summaryrefslogtreecommitdiffstats
path: root/bfs.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-09-15 17:47:22 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-09-15 17:47:22 -0400
commit224f01a6508cececfb327f7692fcab2afb992805 (patch)
tree879fdc5efb4386aa2e34c54e8623bbfda723bb48 /bfs.c
parentf2c9a7dbca9da36aa0cca8c4d0759e4d0406df91 (diff)
downloadbfs-224f01a6508cececfb327f7692fcab2afb992805.tar.xz
Fix -maxdepth handling when -depth is set.
Lost some data due to this bug :(.
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);
}