Edit appdirs site_config_dir function

This change causes site_config_dir function to return
/etc/cheat on linux systems. This is right because most
linux distributions follow FHS where /etc is a directory
which contains system-wide configuration files.
This commit is contained in:
Tomas Korbar 2019-07-24 13:28:56 +02:00
parent fdc414ede3
commit 12e8059025
1 changed files with 2 additions and 0 deletions

View File

@ -245,6 +245,8 @@ def site_config_dir(appname=None, appauthor=None, version=None, multipath=False)
path = os.path.expanduser('/Library/Preferences')
if appname:
path = os.path.join(path, appname)
elif system == 'linux':
path = os.path.join('/etc/', appname)
else:
# XDG default for $XDG_CONFIG_DIRS
# only first, if multipath is False