diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-11-21 15:25:44 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-11-21 15:28:45 -0500 |
commit | 40df4d3d4d6389fbec579e555e79e0ca577e342a (patch) | |
tree | c19e920ccbb6c8ffac44b28e654db57fe5e4f9e0 /eval.c | |
parent | f80e6b781d1b98f4b50ed4b235edd1fb3deae199 (diff) | |
download | bfs-40df4d3d4d6389fbec579e555e79e0ca577e342a.tar.xz |
bftw: Make bftw_flags more similar to fts() options.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -803,8 +803,11 @@ bool eval_type(const struct expr *expr, struct eval_state *state) { bool eval_xtype(const struct expr *expr, struct eval_state *state) { struct BFTW *ftwbuf = state->ftwbuf; - bool is_root = ftwbuf->depth == 0; - bool follow = state->cmdline->flags & (is_root ? BFTW_FOLLOW_ROOT : BFTW_FOLLOW_NONROOT); + int follow_flags = BFTW_LOGICAL; + if (ftwbuf->depth == 0) { + follow_flags |= BFTW_COMFOLLOW; + } + bool follow = state->cmdline->flags & follow_flags; bool is_link = ftwbuf->typeflag == BFTW_LNK; if (follow == is_link) { |