summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bftw.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/bftw.c b/bftw.c
index 2313fec..1141716 100644
--- a/bftw.c
+++ b/bftw.c
@@ -1097,7 +1097,7 @@ static int bftw_push(struct bftw_state *state, const char *name) {
const struct BFTW *ftwbuf = &state->ftwbuf;
const struct bfs_stat *statbuf = ftwbuf->stat_cache.buf;
- if (!statbuf) {
+ if (!statbuf || (ftwbuf->stat_flags & BFS_STAT_NOFOLLOW)) {
statbuf = ftwbuf->lstat_cache.buf;
}
if (statbuf) {