diff options
Diffstat (limited to 'io/ftw.c')
-rw-r--r-- | io/ftw.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -423,10 +423,12 @@ process_entry (struct ftw_data *data, struct dir_data *dir, const char *name, result = -1; else if (data->flags & FTW_PHYS) flag = FTW_NS; - else if (d_type == DT_LNK) - flag = FTW_SLN; else { + /* Old code left ST undefined for dangling DT_LNK without + FTW_PHYS set; a clarification at the POSIX level suggests + it should contain information about the link (ala lstat). + We do our best to fill in what data we can. */ if (dir->streamfd != -1) statres = FXSTATAT (_STAT_VER, dir->streamfd, name, &st, AT_SYMLINK_NOFOLLOW); |