Kaydet (Commit) 402b53d4 authored tarafından Georg Brandl's avatar Georg Brandl

bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames

üst 3225242a
......@@ -7248,7 +7248,8 @@ win32_startfile(PyObject *self, PyObject *args)
{
char *filepath;
HINSTANCE rc;
if (!PyArg_ParseTuple(args, "s:startfile", &filepath))
if (!PyArg_ParseTuple(args, "et:startfile",
Py_FileSystemDefaultEncoding, &filepath))
return NULL;
Py_BEGIN_ALLOW_THREADS
rc = ShellExecute((HWND)0, NULL, filepath, NULL, NULL, SW_SHOWNORMAL);
......
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