History

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

cinap_lenrek committed 10 years ago

Commit ec8c4381 parent 49f75401 file · +4 −0Browse files

Showing the changes to sys/src/cmd/python (1 of 1 file). Show all

Unified · Split

sys/src/cmd/python/Extra/mercurial/osutil.c+4−0
@@ -318,6 +318,9 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip) · 317 unmodified lines
318 318
319 kind = entkind(ent);319 kind = entkind(ent);
320 if (kind == -1 || keepstat) {320 if (kind == -1 || keepstat) {
321#ifdef PLAN9APE
322 st = ent->d_stat;
323#else
321#ifdef AT_SYMLINK_NOFOLLOW324#ifdef AT_SYMLINK_NOFOLLOW
322 err = fstatat(dfd, ent->d_name, &st,325 err = fstatat(dfd, ent->d_name, &st,
323 AT_SYMLINK_NOFOLLOW);326 AT_SYMLINK_NOFOLLOW);
@@ -335,6 +338,7 @@ static PyObject *_listdir(char *path, int pathlen, int keepstat, char *skip) · 11 unmodified lines
335 fullpath);338 fullpath);
336 goto error;339 goto error;
337 }340 }
341#endif
338 kind = st.st_mode & S_IFMT;342 kind = st.st_mode & S_IFMT;
339 }343 }
340 344