Use XDG_CONFIG_HOME for user configuration directory, if set.

This commit is contained in:
Florian Lindner 2018-06-18 18:53:35 +02:00
parent 9d4ba66f6e
commit ff8bd697ed
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
]