diff options
author | Martin v. Löwis <martin@v.loewis.de> | 2004-06-15 18:49:58 (GMT) |
---|---|---|
committer | Martin v. Löwis <martin@v.loewis.de> | 2004-06-15 18:49:58 (GMT) |
commit | 969297f488f314833e8ed591123deff7bd154cbd (patch) | |
tree | d07f85ea6ed1bf51c73564ced1428c6ba9bad9af /Modules/posixmodule.c | |
parent | 0d6e8f2e65a9ce2366c8ea9f7bacdc7778255090 (diff) | |
download | cpython-969297f488f314833e8ed591123deff7bd154cbd.zip cpython-969297f488f314833e8ed591123deff7bd154cbd.tar.gz cpython-969297f488f314833e8ed591123deff7bd154cbd.tar.bz2 |
Return unicode strings from _getfullpathname even on W9X. Fixes #924703 .
Diffstat (limited to 'Modules/posixmodule.c')
-rw-r--r-- | Modules/posixmodule.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index a375dcb..474e00e 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -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 */ |