Kaydet (Commit) 0b48954c authored tarafından Christian Heimes's avatar Christian Heimes

Fixed bug in _fileio.c and test_pep277. On Windows IOError.filename was not set…

Fixed bug in _fileio.c and test_pep277. On Windows IOError.filename was not set because the name is stored in widename.
üst 6ae5d7f2
......@@ -267,7 +267,11 @@ fileio_init(PyObject *oself, PyObject *args, PyObject *kwds)
self->fd = open(name, flags, 0666);
Py_END_ALLOW_THREADS
if (self->fd < 0 || dircheck(self) < 0) {
#ifdef MS_WINDOWS
PyErr_SetFromErrnoWithUnicodeFilename(PyExc_IOError, widename);
#else
PyErr_SetFromErrnoWithFilename(PyExc_IOError, name);
#endif
goto error;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment