Use XDG_CONFIG_HOME for user configuration directory, if set. #70

Closed
floli wants to merge 1 commits from (deleted):add_user_config into main
1 changed files with 3 additions and 3 deletions

View File

@ -1,10 +1,10 @@
import os
XDG_CONFIG_HOME = os.getenv('XDG_CONFIG_HOME') or os.path.expandvars(os.path.join('$HOME', '.config'))
DEFAULT_CONFIG_PATHS = [
'/etc/borgmatic/config.yaml',
'/etc/borgmatic.d',
os.path.expanduser('~/.config/borgmatic/config.yaml'),
'/etc/borgmatic/config.yaml', '/etc/borgmatic.d',
'%s/borgmatic/config.yaml' % XDG_CONFIG_HOME
]