This commit is contained in:
Kovid Goyal 2019-10-25 07:45:30 +05:30
commit 6634dc81fe
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -49,9 +49,8 @@ def _get_config_dir():
locations.append(os.path.expanduser('~/.config'))
if is_macos:
locations.append(os.path.expanduser('~/Library/Preferences'))
if 'XDG_CONFIG_DIRS' in os.environ:
for loc in os.environ['XDG_CONFIG_DIRS'].split(os.pathsep):
locations.append(os.path.abspath(os.path.expanduser(loc)))
for loc in filter(None, os.environ.get('XDG_CONFIG_DIRS', '').split(os.pathsep)):
locations.append(os.path.abspath(os.path.expanduser(loc)))
for loc in locations:
if loc:
q = os.path.join(loc, appname)