Clear errno before calling opendir() and readdir().

This commit is contained in:
Georg Brandl 2006-04-11 07:04:06 +00:00
parent 377be11ee1
commit 05e89b86d6
1 changed files with 1 additions and 0 deletions

View File

@ -1845,6 +1845,7 @@ posix_listdir(PyObject *self, PyObject *args)
struct dirent *ep;
int arg_is_unicode = 1;
errno = 0;
if (!PyArg_ParseTuple(args, "U:listdir", &v)) {
arg_is_unicode = 0;
PyErr_Clear();