Commit 220bf358 authored by Philipp Hörist's avatar Philipp Hörist

Create some folders only on demand

parent c0c16dbf
......@@ -130,7 +130,8 @@ class ConfigPaths:
def init(self):
if self.custom_config_root:
self.cache_root = self.data_root = self.config_root = self.custom_config_root
self.config_root = self.custom_config_root
self.cache_root = self.data_root = self.custom_config_root
user_dir_paths = [
('TMP', tempfile.gettempdir()),
......@@ -150,7 +151,8 @@ class ConfigPaths:
# Config paths
('CONFIG_FILE', 'config', PathLocation.CONFIG, PathType.FILE),
('PLUGINS_CONFIG_DIR', 'pluginsconfig', PathLocation.CONFIG, PathType.FOLDER),
('PLUGINS_CONFIG_DIR',
'pluginsconfig', PathLocation.CONFIG, PathType.FOLDER),
('MY_CERT', 'localcerts', PathLocation.CONFIG, PathType.FOLDER),
]
......@@ -163,11 +165,15 @@ class ConfigPaths:
# Data paths
('LOG_DB', 'logs.db', PathLocation.DATA, PathType.FILE),
('MY_CACERTS', 'cacerts.pem', PathLocation.DATA, PathType.FILE),
('MY_EMOTS', 'emoticons', PathLocation.DATA, PathType.FOLDER),
('MY_ICONSETS', 'iconsets', PathLocation.DATA, PathType.FOLDER),
('MY_MOOD_ICONSETS', 'moods', PathLocation.DATA, PathType.FOLDER),
('MY_ACTIVITY_ICONSETS', 'activities', PathLocation.DATA, PathType.FOLDER),
('PLUGINS_USER', 'plugins', PathLocation.DATA, PathType.FOLDER),
('MY_EMOTS',
'emoticons', PathLocation.DATA, PathType.FOLDER_OPTIONAL),
('MY_ICONSETS',
'iconsets', PathLocation.DATA, PathType.FOLDER_OPTIONAL),
('MY_MOOD_ICONSETS',
'moods', PathLocation.DATA, PathType.FOLDER_OPTIONAL),
('MY_ACTIVITY_ICONSETS',
'activities', PathLocation.DATA, PathType.FOLDER_OPTIONAL),
# Cache paths
('CACHE_DB', 'cache.db', PathLocation.CACHE, PathType.FILE),
......
......@@ -51,6 +51,7 @@ class PathLocation(IntEnum):
class PathType(IntEnum):
FILE = 0
FOLDER = 1
FOLDER_OPTIONAL = 2
THANKS = u"""\
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment