diff options
author | Jakub Jelinek <jakub@redhat.com> | 2006-03-06 07:30:01 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2006-03-06 07:30:01 +0000 |
commit | b3643a38588a0d7217ef933735b9cf142ccdbf2d (patch) | |
tree | dfd2d46a4adfdb376f8a8632289e117055f0e039 /io | |
parent | 51d2f6dd7f5c5a2838e864f7d5795f3110536b6d (diff) | |
download | glibc-b3643a38588a0d7217ef933735b9cf142ccdbf2d.tar glibc-b3643a38588a0d7217ef933735b9cf142ccdbf2d.tar.gz glibc-b3643a38588a0d7217ef933735b9cf142ccdbf2d.tar.bz2 glibc-b3643a38588a0d7217ef933735b9cf142ccdbf2d.zip |
Updated to fedora-glibc-20060306T0720
Diffstat (limited to 'io')
-rw-r--r-- | io/ftw.c | 19 |
1 files changed, 14 insertions, 5 deletions
@@ -419,13 +419,22 @@ process_entry (struct ftw_data *data, struct dir_data *dir, const char *name, { if (errno != EACCES && errno != ENOENT) result = -1; - else if (!(data->flags & FTW_PHYS) - && (d_type == DT_LNK - || (LXSTAT (_STAT_VER, name, &st) == 0 - && S_ISLNK (st.st_mode)))) + else if (data->flags & FTW_PHYS) + flag = FTW_NS; + else if (d_type == DT_LNK) flag = FTW_SLN; else - flag = FTW_NS; + { + if (dir->streamfd != -1) + statres = FXSTATAT (_STAT_VER, dir->streamfd, name, &st, + AT_SYMLINK_NOFOLLOW); + else + statres = LXSTAT (_STAT_VER, name, &st); + if (statres == 0 && S_ISLNK (st.st_mode)) + flag = FTW_SLN; + else + flag = FTW_NS; + } } else { |