fix nftw FTW_MOUNT flag

the incorrect check for crossing device boundaries was preventing nftw
from traversing anything except the initially provided pathname.
This commit is contained in:
Rich Felker 2014-02-01 14:33:33 -05:00
parent f1471d3216
commit 73871ee3f2
1 changed files with 1 additions and 2 deletions

View File

@ -46,8 +46,7 @@ static int do_nftw(char *path, int (*fn)(const char *, const struct stat *, int,
type = FTW_F;
}
if ((flags & FTW_MOUNT) && h
&& (st.st_dev != h->dev || st.st_ino != h->ino))
if ((flags & FTW_MOUNT) && h && st.st_dev != h->dev)
return 0;
new.chain = h;