summaryrefslogtreecommitdiffstats
path: root/src/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2023-10-17 11:55:31 -0400
committerTavian Barnes <tavianator@tavianator.com>2023-10-17 12:33:39 -0400
commitdd1c8c2f08d232d5745dc1f5fe483ec4072fe454 (patch)
treee4b1b5720d7df0bc3ca9aa0fb9fdc0d50636d019 /src/parse.c
parent68949cf1b9cb5336ea06ad7f87db8e28b620f2ac (diff)
downloadbfs-dd1c8c2f08d232d5745dc1f5fe483ec4072fe454.tar.xz
parse: Set BFTW_WHITEOUTS when parsing -type w
Diffstat (limited to 'src/parse.c')
-rw-r--r--src/parse.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/parse.c b/src/parse.c
index 976f7cb..fafd787 100644
--- a/src/parse.c
+++ b/src/parse.c
@@ -2514,6 +2514,8 @@ static struct bfs_expr *parse_status(struct parser_state *state, int arg1, int a
* Parse -x?type [bcdpflsD].
*/
static struct bfs_expr *parse_type(struct parser_state *state, int x, int arg2) {
+ struct bfs_ctx *ctx = state->ctx;
+
bfs_eval_fn *eval = x ? eval_xtype : eval_type;
struct bfs_expr *expr = parse_unary_test(state, eval);
if (!expr) {
@@ -2551,6 +2553,7 @@ static struct bfs_expr *parse_type(struct parser_state *state, int x, int arg2)
break;
case 'w':
expr->num |= 1 << BFS_WHT;
+ ctx->flags |= BFTW_WHITEOUTS;
break;
case '\0':