From 56d09b58f8dc4dc397158cdcae5c8b3b26c8eded Mon Sep 17 00:00:00 2001 From: Ruud Date: Mon, 10 Oct 2011 13:53:14 +0200 Subject: [PATCH] Check renamer from and to folders --- couchpotato/core/plugins/renamer/main.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/couchpotato/core/plugins/renamer/main.py b/couchpotato/core/plugins/renamer/main.py index e51cf3c..adee1f4 100644 --- a/couchpotato/core/plugins/renamer/main.py +++ b/couchpotato/core/plugins/renamer/main.py @@ -27,6 +27,11 @@ class Renamer(Plugin): if self.isDisabled(): return + # Check to see if the "to" folder is inside the "from" folder. + if self.conf('from') in self.conf('to'): + log.error('The "to" can\'t be inside of the "from" folder. You\'ll get an infinite loop.') + return + groups = fireEvent('scanner.scan', folder = self.conf('from'), single = True) if groups is None: return