From cb0216c506b1fbaa2b01e85fed1929242c4906de Mon Sep 17 00:00:00 2001 From: JackDandy Date: Fri, 13 Feb 2015 05:00:24 +0000 Subject: [PATCH] Change to allow file moving across partition. --- CHANGES.md | 1 + sickbeard/helpers.py | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 36f6cab1..44ff83c0 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -8,6 +8,7 @@ * Update change to suppress HTTPS verification InsecureRequestWarning to updated package (ref:hacks.txt) * Change to consolidate cache database migration code * Change to only rebuild namecache on show update instead of on every search +* Change to allow file moving across partition * Add removal of old entries from namecache on show deletion * Add Hallmark and specific ITV logos, remove logo of non-english Comedy Central Family * Fix provider TD failing to find episodes of air by date shows diff --git a/sickbeard/helpers.py b/sickbeard/helpers.py index 9088483f..09942c0b 100644 --- a/sickbeard/helpers.py +++ b/sickbeard/helpers.py @@ -266,7 +266,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) @@ -304,7 +304,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: @@ -396,7 +396,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) as e: logger.log(u"Failed renaming " + cur_path + " to " + new_path + ": " + ex(e), logger.ERROR) return False