mirror of
https://github.com/python/cpython
synced 2024-10-14 21:01:10 +00:00
Return unicode strings from _getfullpathname even on W9X. Fixes #924703 .
This commit is contained in:
parent
0d6e8f2e65
commit
969297f488
|
@ -1736,6 +1736,10 @@ posix__getfullpathname(PyObject *self, PyObject *args)
|
|||
if (!GetFullPathName(inbuf, sizeof(outbuf)/sizeof(outbuf[0]),
|
||||
outbuf, &temp))
|
||||
return win32_error("GetFullPathName", inbuf);
|
||||
if (PyUnicode_Check(PyTuple_GetItem(args, 0))) {
|
||||
return PyUnicode_Decode(outbuf, strlen(outbuf),
|
||||
Py_FileSystemDefaultEncoding, NULL);
|
||||
}
|
||||
return PyString_FromString(outbuf);
|
||||
} /* end of posix__getfullpathname */
|
||||
#endif /* MS_WINDOWS */
|
||||
|
|
Loading…
Reference in a new issue