mirror of
https://github.com/SickGear/SickGear.git
synced 2024-12-11 05:33:37 +00:00
Fix for symlinking during Post-Processing
As described here: https://sickrage.tv/forums/forum/help-support/bug-issue-reports/5016-several-issues
This commit is contained in:
parent
f6d662ca6b
commit
aba5cc10d2
1 changed files with 4 additions and 8 deletions
|
@ -462,16 +462,12 @@ def hardlinkFile(srcFile, destFile):
|
||||||
copyFile(srcFile, destFile)
|
copyFile(srcFile, destFile)
|
||||||
|
|
||||||
|
|
||||||
def symlink(srcFile, destFile):
|
def symlink(src, dst):
|
||||||
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,1280]: raise ctypes.WinError()
|
||||||
if ctypes.windll.kernel32.CreateSymbolicLinkW(unicode(destFile), unicode(srcFile),
|
|
||||||
1 if os.path.isdir(srcFile) else 0) in [0,
|
|
||||||
1280]:
|
|
||||||
raise ctypes.WinError()
|
|
||||||
else:
|
else:
|
||||||
os.symlink(srcFile, destFile)
|
os.symlink(src, dst)
|
||||||
|
|
||||||
|
|
||||||
def moveAndSymlinkFile(srcFile, destFile):
|
def moveAndSymlinkFile(srcFile, destFile):
|
||||||
|
|
Loading…
Reference in a new issue