summaryrefslogtreecommitdiffstats
path: root/parse.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-05-04 11:51:56 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-04 11:55:07 -0400
commitd40691e31e2674d7d95ec9160b9897805ce3f43b (patch)
tree7b2a6c031a2808e7bc9c94e60c708595e3d7e7a8 /parse.c
parentd61c4ed8551e5ef5642f93acec0b5c3f84ebede9 (diff)
downloadbfs-d40691e31e2674d7d95ec9160b9897805ce3f43b.tar.xz
stat: Unify the flags arguments
Diffstat (limited to 'parse.c')
-rw-r--r--parse.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/parse.c b/parse.c
index 6367cd6..10a7300 100644
--- a/parse.c
+++ b/parse.c
@@ -465,9 +465,9 @@ static int stat_arg(const struct parser_state *state, struct expr *expr, struct
const struct cmdline *cmdline = state->cmdline;
bool follow = cmdline->flags & (BFTW_COMFOLLOW | BFTW_LOGICAL);
- int at_flags = follow ? 0 : AT_SYMLINK_NOFOLLOW;
+ enum bfs_stat_flag flags = follow ? BFS_STAT_TRYFOLLOW : BFS_STAT_NOFOLLOW;
- int ret = bfs_stat(AT_FDCWD, expr->sdata, at_flags, BFS_STAT_BROKEN_OK, sb);
+ int ret = bfs_stat(AT_FDCWD, expr->sdata, flags, sb);
if (ret != 0) {
parse_error(state, "'%s': %m.\n", expr->sdata);
}