mercurial: use new d_stat from dirent structure in osutil.listdir
This commit is contained in:
parent
5debddf8af
commit
193daffafb
1 changed files with 4 additions and 0 deletions
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue