Use XDG config path on FreeBSD #8103

Merged
merged 1 commit into from Feb 20, 2017
@@ -140,8 +140,8 @@ locations, in the following order:
3. It next looks in a user-specific place, depending on your platform:
- - On Linux, it looks in :file:`.config/matplotlib/matplotlibrc` (or
- `$XDG_CONFIG_HOME/matplotlib/matplotlibrc`) if you've customized
+ - On Linux and FreeBSD, it looks in :file:`.config/matplotlib/matplotlibrc`
+ (or `$XDG_CONFIG_HOME/matplotlib/matplotlibrc`) if you've customized
your environment.
- On other platforms, it looks in :file:`.matplotlib/matplotlibrc`.
@@ -645,7 +645,7 @@ def _get_config_or_cache_dir(xdg_base):
h = get_home()
if h is not None:
p = os.path.join(h, '.matplotlib')
- if sys.platform.startswith('linux'):
+ if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'):
p = None
if xdg_base is not None:
p = os.path.join(xdg_base, 'matplotlib')