Fix for symlinking during Post-Processing

This commit is contained in:
echel0n 2014-07-12 15:10:10 -07:00
parent 21cc92664f
commit 9a6be98f1f

View file

@ -439,15 +439,15 @@ def hardlinkFile(srcFile, destFile):
copyFile(srcFile, destFile) copyFile(srcFile, destFile)
def symlink(src, dst): def symlink(srcFile, destFile):
if os.name == 'nt': if os.name == 'nt':
import ctypes import ctypes
if ctypes.windll.kernel32.CreateSymbolicLinkW(unicode(dst), unicode(src), 1 if os.path.isdir(src) else 0) in [0, if ctypes.windll.kernel32.CreateSymbolicLinkW(unicode(destFile), unicode(srcFile), 1 if os.path.isdir(srcFile) else 0) in [0,
1280]: 1280]:
raise ctypes.WinError() raise ctypes.WinError()
else: else:
os.symlink(src, dst) os.symlink(srcFile, destFile)
def moveAndSymlinkFile(srcFile, destFile): def moveAndSymlinkFile(srcFile, destFile):