diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2016-02-13 17:14:03 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2016-02-13 17:14:03 -0500 |
commit | 30ce56dc76f3a098c42c7ac9701fc4a223847fa2 (patch) | |
tree | 15e8a0aed66d93fb26c9a819846527eada1a0905 /eval.c | |
parent | 4cd28ed2aa3f098a1d35dd44ecec27002fadb89b (diff) | |
download | bfs-30ce56dc76f3a098c42c7ac9701fc4a223847fa2.tar.xz |
Implement -iname and -ipath.
Diffstat (limited to 'eval.c')
-rw-r--r-- | eval.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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; } /** |