Private GIT

Skip to content
Snippets Groups Projects
Commit 5ac30820 authored by sharkykh's avatar sharkykh Committed by miigotu
Browse files

Fix #3463 failed to create hardlink on Windows

parent 0bed580c
No related branches found
No related tags found
No related merge requests found
......@@ -388,8 +388,8 @@ def link(src, dst):
:param dst: Destination file
"""
if (platform.system() == 'Windows' and ctypes.windll.kernel32.CreateHardLinkW(ctypes.c_wchar_p(six.text_type(dst)),
ctypes.c_wchar_p(six.text_type(src)), None) == 0):
if platform.system() == 'Windows':
if ctypes.windll.kernel32.CreateHardLinkW(ctypes.c_wchar_p(six.text_type(dst)), ctypes.c_wchar_p(six.text_type(src)), None) == 0:
raise ctypes.WinError()
else:
ek(os.link, src, dst)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment