Fix XDG_CONFIG_HOME check
This allows pkgcrap to fall back to ~/.config instead of crashing.
This commit is contained in:
parent
423ec61cad
commit
bb152b2112
|
@ -6,7 +6,7 @@ import pkgcrap.parse as parse
|
|||
|
||||
def conf_dir_path():
|
||||
conf_home = '~/.config'
|
||||
if os.environ:
|
||||
if 'XDG_CONFIG_HOME' in os.environ:
|
||||
conf_home = os.environ['XDG_CONFIG_HOME']
|
||||
if conf_home[0] == '~':
|
||||
conf_home = os.environ['HOME']+'/'+conf_home[1:]
|
||||
|
|
Loading…
Reference in New Issue
Block a user