mirror of
https://github.com/python/cpython.git
synced 2025-08-02 16:13:13 +00:00
Issue #12442: nt._getdiskusage() is now using the Windows Unicode API
This commit is contained in:
parent
fd9cd24a05
commit
6139c1bfa3
1 changed files with 3 additions and 3 deletions
|
@ -8163,13 +8163,13 @@ win32__getdiskusage(PyObject *self, PyObject *args)
|
||||||
{
|
{
|
||||||
BOOL retval;
|
BOOL retval;
|
||||||
ULARGE_INTEGER _, total, free;
|
ULARGE_INTEGER _, total, free;
|
||||||
LPCTSTR path;
|
const wchar_t *path;
|
||||||
|
|
||||||
if (! PyArg_ParseTuple(args, "s", &path))
|
if (! PyArg_ParseTuple(args, "u", &path))
|
||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
Py_BEGIN_ALLOW_THREADS
|
Py_BEGIN_ALLOW_THREADS
|
||||||
retval = GetDiskFreeSpaceEx(path, &_, &total, &free);
|
retval = GetDiskFreeSpaceExW(path, &_, &total, &free);
|
||||||
Py_END_ALLOW_THREADS
|
Py_END_ALLOW_THREADS
|
||||||
if (retval == 0)
|
if (retval == 0)
|
||||||
return PyErr_SetFromWindowsErr(0);
|
return PyErr_SetFromWindowsErr(0);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue