]> granicus.if.org Git - python/commitdiff
Issue #12442: nt._getdiskusage() is now using the Windows Unicode API
authorVictor Stinner <victor.stinner@haypocalc.com>
Wed, 9 Nov 2011 21:14:14 +0000 (22:14 +0100)
committerVictor Stinner <victor.stinner@haypocalc.com>
Wed, 9 Nov 2011 21:14:14 +0000 (22:14 +0100)
Modules/posixmodule.c

index 09705c806a352226217cd1f60fa3d20001675e28..26fc25f5b9dfe748574abff05d10595f6dba158f 100644 (file)
@@ -8163,13 +8163,13 @@ win32__getdiskusage(PyObject *self, PyObject *args)
 {
     BOOL retval;
     ULARGE_INTEGER _, total, free;
-    LPCTSTR path;
+    const wchar_t *path;
 
-    if (! PyArg_ParseTuple(args, "s", &path))
+    if (! PyArg_ParseTuple(args, "u", &path))
         return NULL;
 
     Py_BEGIN_ALLOW_THREADS
-    retval = GetDiskFreeSpaceEx(path, &_, &total, &free);
+    retval = GetDiskFreeSpaceExW(path, &_, &total, &free);
     Py_END_ALLOW_THREADS
     if (retval == 0)
         return PyErr_SetFromWindowsErr(0);