Browse Source

fix nftw FTW_MOUNT flag

the incorrect check for crossing device boundaries was preventing nftw
from traversing anything except the initially provided pathname.
Rich Felker 11 năm trước cách đây
mục cha
commit
73871ee3f2
1 tập tin đã thay đổi với 1 bổ sung2 xóa
  1. 1 2
      src/misc/nftw.c

+ 1 - 2
src/misc/nftw.c

@@ -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;