From 4adad577c8133fd636912b83146b0121da142559 Mon Sep 17 00:00:00 2001 From: Adam Date: Thu, 2 Oct 2014 19:20:03 +0800 Subject: [PATCH] Fixes show folder not deleting if files remain in folder --- sickbeard/tv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sickbeard/tv.py b/sickbeard/tv.py index b720ac43..e58549d2 100644 --- a/sickbeard/tv.py +++ b/sickbeard/tv.py @@ -25,6 +25,7 @@ import re import glob import stat import traceback +import shutil import sickbeard @@ -1004,7 +1005,7 @@ class TVShow(object): except: logger.log(u'Cannot change permissions of ' + self.location, logger.WARNING) - ek.ek(os.rmdir, self.location) + ek.ek(shutil.rmtree, self.location) except OSError, e: logger.log(u"Unable to delete " + self.location + ": " + repr(e) + " / " + str(e), logger.WARNING)