summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-02-13 17:14:03 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-02-13 17:14:03 -0500
commit30ce56dc76f3a098c42c7ac9701fc4a223847fa2 (patch)
tree15e8a0aed66d93fb26c9a819846527eada1a0905 /eval.c
parent4cd28ed2aa3f098a1d35dd44ecec27002fadb89b (diff)
downloadbfs-30ce56dc76f3a098c42c7ac9701fc4a223847fa2.tar.xz
Implement -iname and -ipath.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c8
1 files changed, 4 insertions, 4 deletions
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;
}
/**