From cfc49e286bdbaa4e611a68b5b6fc30e0cf1f52cb Mon Sep 17 00:00:00 2001 From: Ruud Date: Sun, 8 Jun 2014 11:57:53 +0200 Subject: [PATCH] Allowed datadir giving false positive. fix #3399 --- couchpotato/core/_base/_core.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/couchpotato/core/_base/_core.py b/couchpotato/core/_base/_core.py index 91cb97e9..1171478d 100644 --- a/couchpotato/core/_base/_core.py +++ b/couchpotato/core/_base/_core.py @@ -8,7 +8,7 @@ import webbrowser from couchpotato.api import addApiView from couchpotato.core.event import fireEvent, addEvent -from couchpotato.core.helpers.variable import cleanHost, md5 +from couchpotato.core.helpers.variable import cleanHost, md5, isSubFolder from couchpotato.core.logger import CPLog from couchpotato.core.plugins.base import Plugin from couchpotato.environment import Env @@ -71,7 +71,7 @@ class Core(Plugin): return value if value and len(value) > 3 else uuid4().hex def checkDataDir(self): - if Env.get('app_dir') in Env.get('data_dir'): + if isSubFolder(Env.get('data_dir'), Env.get('app_dir')): log.error('You should NOT use your CouchPotato directory to save your settings in. Files will get overwritten or be deleted.') return True