Fix winpaths' call to wintypes in py3k
This commit is contained in:
12
src/fixes/fix_winpaths.py
Normal file
12
src/fixes/fix_winpaths.py
Normal file
@@ -0,0 +1,12 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
import ctypes
|
||||
import winpaths
|
||||
from ctypes import wintypes
|
||||
|
||||
def _get_path_buf(csidl):
|
||||
path_buf = ctypes.create_unicode_buffer(wintypes.MAX_PATH)
|
||||
result = winpaths._SHGetFolderPath(0, csidl, 0, 0, path_buf)
|
||||
return path_buf.value
|
||||
|
||||
def fix():
|
||||
winpaths._get_path_buf = _get_path_buf
|
Reference in New Issue
Block a user