mirror of
https://github.com/moparisthebest/SickRage
synced 2025-01-06 19:38:01 -05:00
Merge pull request #1193 from eli-jordan/develop
use os.system for file copies on posix systems
This commit is contained in:
commit
2a43bda0c2
@ -342,7 +342,11 @@ def listMediaFiles(path):
|
|||||||
|
|
||||||
|
|
||||||
def copyFile(srcFile, destFile):
|
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:
|
try:
|
||||||
ek.ek(shutil.copymode, srcFile, destFile)
|
ek.ek(shutil.copymode, srcFile, destFile)
|
||||||
except OSError:
|
except OSError:
|
||||||
@ -366,6 +370,12 @@ def link(src, dst):
|
|||||||
else:
|
else:
|
||||||
os.link(src, dst)
|
os.link(src, dst)
|
||||||
|
|
||||||
|
def isPosix():
|
||||||
|
if os.name.startswith('posix'):
|
||||||
|
return True
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
|
|
||||||
def hardlinkFile(srcFile, destFile):
|
def hardlinkFile(srcFile, destFile):
|
||||||
try:
|
try:
|
||||||
|
Loading…
Reference in New Issue
Block a user