mirror of
https://github.com/openSUSE/osc.git
synced 2024-09-20 01:06:17 +02:00
fix: XDG_CONFIG_HOME no longer used if empty
Previously, if XDG_CONFIG_HOME was defined as an empty string, it was used. Now, if XDG_CONFIG_HOME is an empty string, `~/.config` is used instead
This commit is contained in:
parent
a78a2f2df9
commit
afd5b27196
@ -1043,9 +1043,12 @@ def identify_conf():
|
||||
if 'OSC_CONFIG' in os.environ:
|
||||
return os.environ.get('OSC_CONFIG')
|
||||
if os.path.exists(os.path.expanduser('~/.oscrc')):
|
||||
conffile = '~/.oscrc'
|
||||
return '~/.oscrc'
|
||||
|
||||
if os.environ.get('XDG_CONFIG_HOME', '') != '':
|
||||
conffile = os.environ.get('XDG_CONFIG_HOME') + '/osc/oscrc'
|
||||
else:
|
||||
conffile = os.environ.get('XDG_CONFIG_HOME', '~/.config') + '/osc/oscrc'
|
||||
conffile = '~/.config/osc/oscrc'
|
||||
|
||||
return conffile
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user