mirror of
https://github.com/python/cpython.git
synced 2025-11-01 02:38:53 +00:00
bug [ 1007046 ] os.startfile() doesn't accept Unicode filenames
This commit is contained in:
parent
3225242a39
commit
402b53d43f
1 changed files with 2 additions and 1 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue