summaryrefslogtreecommitdiffstats
path: root/bftw.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2019-05-23 08:50:02 -0400
committerTavian Barnes <tavianator@tavianator.com>2019-05-23 08:50:02 -0400
commitce4c6999190f4dc3c4c0b5192bb0382655b2e3bd (patch)
treec67dff05291c51ead587fcdddde8005e39d120a7 /bftw.c
parentb39509d52d84ff52617dd9d3240b59cb3d8ca2d4 (diff)
downloadbfs-ce4c6999190f4dc3c4c0b5192bb0382655b2e3bd.tar.xz
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.
Diffstat (limited to 'bftw.c')
-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) {