[lfs] Honor XDG_CONFIG_HOME env variables

This commit is contained in:
derrod 2020-05-15 06:52:58 +02:00
parent b55600f3e3
commit b6a701708b

View file

@ -13,7 +13,12 @@ from legendary.lfs.utils import clean_filename
class LGDLFS: class LGDLFS:
def __init__(self): def __init__(self):
self.log = logging.getLogger('LGDLFS') self.log = logging.getLogger('LGDLFS')
if config_path := os.environ.get('XDG_CONFIG_HOME'):
self.path = os.path.join(config_path, 'legendary')
else:
self.path = os.path.expanduser('~/.config/legendary') self.path = os.path.expanduser('~/.config/legendary')
# EGS user info # EGS user info
self._user_data = None self._user_data = None
# EGS entitlements # EGS entitlements