Create some folders only on demand
This commit is contained in:
parent
c0c16dbf94
commit
220bf35827
|
@ -130,7 +130,8 @@ class ConfigPaths:
|
||||||
|
|
||||||
def init(self):
|
def init(self):
|
||||||
if self.custom_config_root:
|
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 = [
|
user_dir_paths = [
|
||||||
('TMP', tempfile.gettempdir()),
|
('TMP', tempfile.gettempdir()),
|
||||||
|
@ -150,7 +151,8 @@ class ConfigPaths:
|
||||||
|
|
||||||
# Config paths
|
# Config paths
|
||||||
('CONFIG_FILE', 'config', PathLocation.CONFIG, PathType.FILE),
|
('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),
|
('MY_CERT', 'localcerts', PathLocation.CONFIG, PathType.FOLDER),
|
||||||
]
|
]
|
||||||
|
|
||||||
|
@ -163,11 +165,15 @@ class ConfigPaths:
|
||||||
# Data paths
|
# Data paths
|
||||||
('LOG_DB', 'logs.db', PathLocation.DATA, PathType.FILE),
|
('LOG_DB', 'logs.db', PathLocation.DATA, PathType.FILE),
|
||||||
('MY_CACERTS', 'cacerts.pem', 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),
|
('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 paths
|
||||||
('CACHE_DB', 'cache.db', PathLocation.CACHE, PathType.FILE),
|
('CACHE_DB', 'cache.db', PathLocation.CACHE, PathType.FILE),
|
||||||
|
|
|
@ -51,6 +51,7 @@ class PathLocation(IntEnum):
|
||||||
class PathType(IntEnum):
|
class PathType(IntEnum):
|
||||||
FILE = 0
|
FILE = 0
|
||||||
FOLDER = 1
|
FOLDER = 1
|
||||||
|
FOLDER_OPTIONAL = 2
|
||||||
|
|
||||||
|
|
||||||
THANKS = u"""\
|
THANKS = u"""\
|
||||||
|
|
Loading…
Reference in New Issue