From ce4c6999190f4dc3c4c0b5192bb0382655b2e3bd Mon Sep 17 00:00:00 2001 From: Tavian Barnes Date: Thu, 23 May 2019 08:50:02 -0400 Subject: bftw: Take dir->{dev,ino} from the right stat buffer I don't think this can cause any observable bugs, but it's still wrong. --- bftw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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) { -- cgit v1.2.3