summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2015-08-30 14:52:48 -0400
committerTavian Barnes <tavianator@tavianator.com>2015-08-30 14:52:48 -0400
commit27ae855598129ed167699ecf787406238f4f576b (patch)
tree8159d85b301ea08ac04c265613e137f79163cf3f
parente24ffc3a9ea195016a9543d9cc4bf99049f245ce (diff)
downloadbfs-27ae855598129ed167699ecf787406238f4f576b.tar.xz
Fix -nohidden return value.
-rw-r--r--bfs.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/bfs.c b/bfs.c
index 5d0203b..09f4e89 100644
--- a/bfs.c
+++ b/bfs.c
@@ -207,8 +207,12 @@ static bool eval_hidden(const char *fpath, const struct BFTW *ftwbuf, const cmdl
* -nohidden action.
*/
static bool eval_nohidden(const char *fpath, const struct BFTW *ftwbuf, const cmdline *cl, const expression *expr, int *ret) {
- return !eval_hidden(fpath, ftwbuf, cl, expr, ret)
- || eval_prune(fpath, ftwbuf, cl, expr, ret);
+ if (eval_hidden(fpath, ftwbuf, cl, expr, ret)) {
+ eval_prune(fpath, ftwbuf, cl, expr, ret);
+ return false;
+ } else {
+ return true;
+ }
}
/**