diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 7f48d355..8bf157ab 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -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: