mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-01 08:53:37 +00:00
Fix for symlinking during Post-Processing
This commit is contained in:
parent
21cc92664f
commit
9a6be98f1f
1 changed files with 3 additions and 3 deletions
|
@ -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):
|
||||||
|
|
Loading…
Reference in a new issue