From 30ce56dc76f3a098c42c7ac9701fc4a223847fa2 Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Sat, 13 Feb 2016 17:14:03 -0500 Subject: Implement -iname and -ipath. --- eval.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'eval.c') diff --git a/eval.c b/eval.c index cd9b2e5..d0c8b04 100644 --- a/eval.c +++ b/eval.c @@ -308,7 +308,7 @@ bool eval_links(const struct expr *expr, struct eval_state *state) { } /** - * -name test. + * -i?name test. */ bool eval_name(const struct expr *expr, struct eval_state *state) { struct BFTW *ftwbuf = state->ftwbuf; @@ -333,17 +333,17 @@ bool eval_name(const struct expr *expr, struct eval_state *state) { } } - bool ret = fnmatch(expr->sdata, name, 0) == 0; + bool ret = fnmatch(expr->sdata, name, expr->idata) == 0; free(copy); return ret; } /** - * -path test. + * -i?path test. */ bool eval_path(const struct expr *expr, struct eval_state *state) { struct BFTW *ftwbuf = state->ftwbuf; - return fnmatch(expr->sdata, ftwbuf->path, 0) == 0; + return fnmatch(expr->sdata, ftwbuf->path, expr->idata) == 0; } /** -- cgit v1.2.3