Merge pull request #650 from dhellwich/patch-1

Fix for symlinking during Post-Processing
This commit is contained in:
echel0n 2014-07-21 00:32:45 -07:00
commit b4981317a8

View file

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