From 224f01a6508cececfb327f7692fcab2afb992805 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Tue, 15 Sep 2015 17:47:22 -0400 Subject: Fix -maxdepth handling when -depth is set. Lost some data due to this bug :(. --- bfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'bfs.c') 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); } -- cgit v1.2.3