diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 8bf157ab..27168937 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -355,7 +355,7 @@ def copyFile(srcFile, destFile): def moveFile(srcFile, destFile): try: - ek.ek(os.rename, srcFile, destFile) + ek.ek(shutil.move, srcFile, destFile) fixSetGroupID(destFile) except OSError: copyFile(srcFile, destFile) @@ -399,7 +399,7 @@ def symlink(src, dst): def moveAndSymlinkFile(srcFile, destFile): try: - ek.ek(os.rename, srcFile, destFile) + ek.ek(shutil.move, srcFile, destFile) fixSetGroupID(destFile) ek.ek(symlink, destFile, srcFile) except: @@ -491,7 +491,7 @@ def rename_ep_file(cur_path, new_path, old_path_length=0): # move the file try: logger.log(u"Renaming file from " + cur_path + " to " + new_path) - ek.ek(os.rename, cur_path, new_path) + ek.ek(shutil.move, cur_path, new_path) except (OSError, IOError), e: logger.log(u"Failed renaming " + cur_path + " to " + new_path + ": " + ex(e), logger.ERROR) return False