Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8241344

Browse files
authored
Merge pull request #8103 from afvincent/enh_use_xdg_config_path_on_freebsd
Use XDG config path on FreeBSD
2 parents 0d5a02a + 8bf2488 commit 8241344

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

doc/users/customizing.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,8 +140,8 @@ locations, in the following order:
140140

141141
3. It next looks in a user-specific place, depending on your platform:
142142

143-
- On Linux, it looks in :file:`.config/matplotlib/matplotlibrc` (or
144-
`$XDG_CONFIG_HOME/matplotlib/matplotlibrc`) if you've customized
143+
- On Linux and FreeBSD, it looks in :file:`.config/matplotlib/matplotlibrc`
144+
(or `$XDG_CONFIG_HOME/matplotlib/matplotlibrc`) if you've customized
145145
your environment.
146146

147147
- On other platforms, it looks in :file:`.matplotlib/matplotlibrc`.

lib/matplotlib/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -645,7 +645,7 @@ def _get_config_or_cache_dir(xdg_base):
645645
h = get_home()
646646
if h is not None:
647647
p = os.path.join(h, '.matplotlib')
648-
if sys.platform.startswith('linux'):
648+
if sys.platform.startswith('linux') or sys.platform.startswith('freebsd'):
649649
p = None
650650
if xdg_base is not None:
651651
p = os.path.join(xdg_base, 'matplotlib')

0 commit comments

Comments
 (0)