mirror of https://github.com/python/cpython.git
Clear errno before calling opendir() and readdir().
This commit is contained in:
parent
377be11ee1
commit
05e89b86d6
|
@ -1845,6 +1845,7 @@ posix_listdir(PyObject *self, PyObject *args)
|
||||||
struct dirent *ep;
|
struct dirent *ep;
|
||||||
int arg_is_unicode = 1;
|
int arg_is_unicode = 1;
|
||||||
|
|
||||||
|
errno = 0;
|
||||||
if (!PyArg_ParseTuple(args, "U:listdir", &v)) {
|
if (!PyArg_ParseTuple(args, "U:listdir", &v)) {
|
||||||
arg_is_unicode = 0;
|
arg_is_unicode = 0;
|
||||||
PyErr_Clear();
|
PyErr_Clear();
|
||||||
|
|
Loading…
Reference in New Issue