From 2dcae5e2199fc6e7897af95ca1413bb0df6d164e Mon Sep 17 00:00:00 2001 From: JonnyWong16 Date: Mon, 18 Jan 2016 18:52:01 -0800 Subject: [PATCH] Fix folders not created in the data directory --- plexpy/__init__.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plexpy/__init__.py b/plexpy/__init__.py index 2c55e72c..aa9a3d32 100644 --- a/plexpy/__init__.py +++ b/plexpy/__init__.py @@ -95,12 +95,12 @@ def initialize(config_file): 'HTTP_PORT out of bounds: 21 < %s < 65535', CONFIG.HTTP_PORT) CONFIG.HTTP_PORT = 8181 - if CONFIG.HTTPS_CERT == '': + if CONFIG.HTTPS_CERT.startswith(os.path.abspath(DATA_DIR)): CONFIG.HTTPS_CERT = os.path.join(DATA_DIR, 'server.crt') - if CONFIG.HTTPS_KEY == '': + if CONFIG.HTTPS_KEY.startswith(os.path.abspath(DATA_DIR)): CONFIG.HTTPS_KEY = os.path.join(DATA_DIR, 'server.key') - if not CONFIG.LOG_DIR: + if not CONFIG.LOG_DIR.startswith(os.path.abspath(DATA_DIR)): CONFIG.LOG_DIR = os.path.join(DATA_DIR, 'logs') if not os.path.exists(CONFIG.LOG_DIR): @@ -117,7 +117,7 @@ def initialize(config_file): logger.initLogger(console=not QUIET, log_dir=CONFIG.LOG_DIR, verbose=VERBOSE) - if not CONFIG.CACHE_DIR: + if not CONFIG.CACHE_DIR.startswith(os.path.abspath(DATA_DIR)): # Put the cache dir in the data dir for now CONFIG.CACHE_DIR = os.path.join(DATA_DIR, 'cache') if not os.path.exists(CONFIG.CACHE_DIR):