mercurial: use new d_stat from dirent structure in osutil.listdir

This commit is contained in:
cinap_lenrek 2016-08-28 03:41:25 +02:00
parent 5debddf8af
commit 193daffafb

View file

@ -318,6 +318,9 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
kind = entkind(ent); kind = entkind(ent);
if (kind == -1 || keepstat) { if (kind == -1 || keepstat) {
#ifdef PLAN9APE
st = ent->d_stat;
#else
#ifdef AT_SYMLINK_NOFOLLOW #ifdef AT_SYMLINK_NOFOLLOW
err = fstatat(dfd, ent->d_name, &st, err = fstatat(dfd, ent->d_name, &st,
AT_SYMLINK_NOFOLLOW); AT_SYMLINK_NOFOLLOW);
@ -335,6 +338,7 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip)
fullpath); fullpath);
goto error; goto error;
} }
#endif
kind = st.st_mode & S_IFMT; kind = st.st_mode & S_IFMT;
} }