2018-10-26 11:24:13 +00:00
|
|
|
import appdirs
|
|
|
|
import os
|
|
|
|
|
|
|
|
APP_NAME = 'Vorta'
|
|
|
|
APP_AUTHOR = 'BorgBase'
|
2018-11-22 03:06:58 +00:00
|
|
|
dirs = appdirs.AppDirs(APP_NAME, APP_AUTHOR)
|
|
|
|
SETTINGS_DIR = dirs.user_data_dir
|
|
|
|
LOG_DIR = dirs.user_log_dir
|
2019-05-03 18:57:05 +00:00
|
|
|
STATE_DIR = dirs.user_state_dir
|
2018-10-26 11:24:13 +00:00
|
|
|
|
|
|
|
if not os.path.exists(SETTINGS_DIR):
|
|
|
|
os.makedirs(SETTINGS_DIR)
|
2018-11-22 03:06:58 +00:00
|
|
|
|
|
|
|
if not os.path.exists(LOG_DIR):
|
|
|
|
os.makedirs(LOG_DIR)
|
2019-05-03 18:57:05 +00:00
|
|
|
|
|
|
|
if not os.path.exists(STATE_DIR):
|
|
|
|
os.makedirs(STATE_DIR)
|