mirror of
https://github.com/moparisthebest/SickRage
synced 2024-12-04 15:12:23 -05:00
use os.system for file copies on posix systems
This commit is contained in:
parent
8b84e4f4bc
commit
a8787bc0d3
@ -342,7 +342,11 @@ def listMediaFiles(path):
|
||||
|
||||
|
||||
def copyFile(srcFile, destFile):
|
||||
ek.ek(shutil.copyfile, srcFile, destFile)
|
||||
if isPosix():
|
||||
os.system('cp "%s" "%s"' % (srcFile, destFile))
|
||||
else:
|
||||
ek.ek(shutil.copyfile, srcFile, destFile)
|
||||
|
||||
try:
|
||||
ek.ek(shutil.copymode, srcFile, destFile)
|
||||
except OSError:
|
||||
@ -366,6 +370,12 @@ def link(src, dst):
|
||||
else:
|
||||
os.link(src, dst)
|
||||
|
||||
def isPosix():
|
||||
if os.name.startswith('posix'):
|
||||
return True
|
||||
else:
|
||||
return False
|
||||
|
||||
|
||||
def hardlinkFile(srcFile, destFile):
|
||||
try:
|
||||
|
Loading…
Reference in New Issue
Block a user