Backed out changeset 36f2e236c601: For some reason, rewinddir() doesn't work as

it should on OpenIndiana.
This commit is contained in:
Charles-François Natali 2012-01-08 20:30:47 +01:00
parent 38f425e475
commit f2840a8890

View file

@ -2890,7 +2890,6 @@ posix_fdlistdir(PyObject *self, PyObject *args)
close(fd);
return posix_error();
}
rewinddir(dirp);
if ((d = PyList_New(0)) == NULL) {
Py_BEGIN_ALLOW_THREADS
closedir(dirp);
@ -2907,6 +2906,7 @@ posix_fdlistdir(PyObject *self, PyObject *args)
break;
} else {
Py_BEGIN_ALLOW_THREADS
rewinddir(dirp);
closedir(dirp);
Py_END_ALLOW_THREADS
Py_DECREF(d);
@ -2930,6 +2930,7 @@ posix_fdlistdir(PyObject *self, PyObject *args)
Py_DECREF(v);
}
Py_BEGIN_ALLOW_THREADS
rewinddir(dirp);
closedir(dirp);
Py_END_ALLOW_THREADS