mirror of
https://github.com/python/cpython.git
synced 2025-07-29 06:05:00 +00:00
Clear errno before calling opendir() and readdir().
This commit is contained in:
parent
377be11ee1
commit
05e89b86d6
1 changed files with 1 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue