From 3941076c06d35a191efbdfa54588422cd281b272 Mon Sep 17 00:00:00 2001 From: Ruud Date: Tue, 24 Jun 2014 10:09:34 +0200 Subject: [PATCH] Forgot to add the separator to test --- couchpotato/core/helpers/variable.py | 4 ++-- couchpotato/core/plugins/file.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/helpers/variable.py b/couchpotato/core/helpers/variable.py index f98adaa2..b3de6833 100644 --- a/couchpotato/core/helpers/variable.py +++ b/couchpotato/core/helpers/variable.py @@ -294,8 +294,8 @@ def dictIsSubset(a, b): # Returns True if sub_folder is the same as or inside base_folder def isSubFolder(sub_folder, base_folder): if base_folder and sub_folder: - base = sp(os.path.realpath(base_folder)) - subfolder = sp(os.path.realpath(sub_folder)) + base = sp(os.path.realpath(base_folder)) + os.path.sep + subfolder = sp(os.path.realpath(sub_folder)) + os.path.sep return os.path.commonprefix([subfolder, base]) == base return False diff --git a/couchpotato/core/plugins/file.py b/couchpotato/core/plugins/file.py index 2145ffeb..80c073fc 100644 --- a/couchpotato/core/plugins/file.py +++ b/couchpotato/core/plugins/file.py @@ -82,6 +82,7 @@ class FileManager(Plugin): def doSubfolderTest(self): tests = { + ('/test/subfolder', '/test/sub'): False, ('/test/sub/folder', '/test/sub'): True, ('/test/sub/folder', '/test/sub2'): False, ('/sub/fold', '/test/sub/fold'): False,