summaryrefslogtreecommitdiffstats
path: root/eval.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2016-02-13 12:34:08 -0500
committerTavian Barnes <tavianator@tavianator.com>2016-02-13 12:49:38 -0500
commit55fb616348d114a1451ab6cf502a3768d6284e9a (patch)
treeef5f72632be59a2acb903c6ba7ef8f8355474f6d /eval.c
parent603b9da0a0ef485393e9fb9fa14c139cedbe92d0 (diff)
downloadbfs-55fb616348d114a1451ab6cf502a3768d6284e9a.tar.xz
Follow links if appropriate in predicates.
Diffstat (limited to 'eval.c')
-rw-r--r--eval.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/eval.c b/eval.c
index 9beb2f3..7c2f104 100644
--- a/eval.c
+++ b/eval.c
@@ -49,7 +49,7 @@ static void eval_error(struct eval_state *state) {
static const struct stat *fill_statbuf(struct eval_state *state) {
struct BFTW *ftwbuf = state->ftwbuf;
if (!ftwbuf->statbuf) {
- if (fstatat(ftwbuf->at_fd, ftwbuf->at_path, &state->statbuf, AT_SYMLINK_NOFOLLOW) == 0) {
+ if (fstatat(ftwbuf->at_fd, ftwbuf->at_path, &state->statbuf, ftwbuf->at_flags) == 0) {
ftwbuf->statbuf = &state->statbuf;
} else {
eval_error(state);
@@ -104,7 +104,7 @@ bool eval_false(const struct expr *expr, struct eval_state *state) {
*/
bool eval_access(const struct expr *expr, struct eval_state *state) {
struct BFTW *ftwbuf = state->ftwbuf;
- return faccessat(ftwbuf->at_fd, ftwbuf->at_path, expr->idata, AT_SYMLINK_NOFOLLOW) == 0;
+ return faccessat(ftwbuf->at_fd, ftwbuf->at_path, expr->idata, ftwbuf->at_flags) == 0;
}
/**