mirror of
https://github.com/moparisthebest/SickRage
synced 2024-11-17 14:55:07 -05:00
Fix for symlinking during Post-Processing
This commit is contained in:
parent
21cc92664f
commit
9a6be98f1f
@ -439,15 +439,15 @@ def hardlinkFile(srcFile, destFile):
|
||||
copyFile(srcFile, destFile)
|
||||
|
||||
|
||||
def symlink(src, dst):
|
||||
def symlink(srcFile, destFile):
|
||||
if os.name == 'nt':
|
||||
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]:
|
||||
raise ctypes.WinError()
|
||||
else:
|
||||
os.symlink(src, dst)
|
||||
os.symlink(srcFile, destFile)
|
||||
|
||||
|
||||
def moveAndSymlinkFile(srcFile, destFile):
|
||||
|
Loading…
Reference in New Issue
Block a user