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

Skip to content

Commit a003902

Browse files
NelleVQuLogic
authored andcommitted
Merge pull request #8103 from afvincent/enh_use_xdg_config_path_on_freebsd
Use XDG config path on FreeBSD
1 parent 36ec04f commit a003902

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
@@ -639,7 +639,7 @@ def _get_config_or_cache_dir(xdg_base):
639639
h = get_home()
640640
if h is not None:
641641
p = os.path.join(h, '.matplotlib')
642-
if (sys.platform.startswith('linux') and xdg_base):
642+
if sys.platform.startswith(('linux', 'freebsd')) and xdg_base:
643643
p = os.path.join(xdg_base, 'matplotlib')
644644

645645
if p is not None:

0 commit comments

Comments
 (0)