Show More
@@ -270,10 +270,13 b' static PyObject *_listdir(char *path, in' | |||||
270 | { |
|
270 | { | |
271 | PyObject *list, *elem, *stat, *ret = NULL; |
|
271 | PyObject *list, *elem, *stat, *ret = NULL; | |
272 | char fullpath[PATH_MAX + 10]; |
|
272 | char fullpath[PATH_MAX + 10]; | |
273 |
int kind, |
|
273 | int kind, err; | |
274 | struct stat st; |
|
274 | struct stat st; | |
275 | struct dirent *ent; |
|
275 | struct dirent *ent; | |
276 | DIR *dir; |
|
276 | DIR *dir; | |
|
277 | #ifdef AT_SYMLINK_NOFOLLOW | |||
|
278 | int dfd = -1; | |||
|
279 | #endif | |||
277 |
|
280 | |||
278 | if (pathlen >= PATH_MAX) { |
|
281 | if (pathlen >= PATH_MAX) { | |
279 | PyErr_SetString(PyExc_ValueError, "path too long"); |
|
282 | PyErr_SetString(PyExc_ValueError, "path too long"); |
@@ -865,7 +865,9 b' def _statfiles_clustered(files):' | |||||
865 | # handle directory not found in Python version prior to 2.5 |
|
865 | # handle directory not found in Python version prior to 2.5 | |
866 | # Python <= 2.4 returns native Windows code 3 in errno |
|
866 | # Python <= 2.4 returns native Windows code 3 in errno | |
867 | # Python >= 2.5 returns ENOENT and adds winerror field |
|
867 | # Python >= 2.5 returns ENOENT and adds winerror field | |
868 | if err.errno not in (3, errno.ENOENT, errno.ENOTDIR): |
|
868 | # EINVAL is raised if dir is not a directory. | |
|
869 | if err.errno not in (3, errno.ENOENT, errno.EINVAL, | |||
|
870 | errno.ENOTDIR): | |||
869 | raise |
|
871 | raise | |
870 | dmap = {} |
|
872 | dmap = {} | |
871 | cache = dircache.setdefault(dir, dmap) |
|
873 | cache = dircache.setdefault(dir, dmap) |
General Comments 0
You need to be logged in to leave comments.
Login now