mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
os.mkdir() would crash with a Unicode filename and mode param.
This commit is contained in:
parent
90195e2616
commit
05107b6af7
1 changed files with 1 additions and 1 deletions
|
@ -1863,7 +1863,7 @@ posix_mkdir(PyObject *self, PyObject *args)
|
|||
#ifdef Py_WIN_WIDE_FILENAMES
|
||||
if (unicode_file_names()) {
|
||||
PyUnicodeObject *po;
|
||||
if (PyArg_ParseTuple(args, "U|i:mkdir", &po)) {
|
||||
if (PyArg_ParseTuple(args, "U|i:mkdir", &po, &mode)) {
|
||||
Py_BEGIN_ALLOW_THREADS
|
||||
/* PyUnicode_AS_UNICODE OK without thread lock as
|
||||
it is a simple dereference. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue