Skip to content

Commit c865e6b

Browse files
committed
Solve bug in python port for windows.
1 parent 741eca2 commit c865e6b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/ports/py_port/metacall/module_win32.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def get_loaded_module(modules, module_name):
5454
cPath = ctypes.c_char_p(b'\0' * 1024)
5555
kernel32.GetModuleFileNameA(module, cPath, ctypes.c_ulong(1024))
5656
path = cPath.value
57-
if path.endswith(bytes(module_name, 'ascii')):
57+
if os.path.normpath(path.decode('utf-8')) == os.path.normpath(module_name):
5858
return module
5959
return None
6060

0 commit comments

Comments
 (0)