After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 757377 - settings.ini is only loaded from first XDG_CONFIG_DIRS entry
settings.ini is only loaded from first XDG_CONFIG_DIRS entry
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.16.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2015-10-30 17:03 UTC by Benno Fünfstück
Modified: 2015-10-31 22:16 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Respect all directories in XDG_CONFIG_DIRS when loading settings.ini (702 bytes, patch)
2015-10-30 17:03 UTC, Benno Fünfstück
none Details | Review

Description Benno Fünfstück 2015-10-30 17:03:09 UTC
Created attachment 314510 [details] [review]
Respect all directories in XDG_CONFIG_DIRS when loading settings.ini

When XDG_CONFIG_DIRS is set to multiple directories, only the settings.ini in the first entry will be loaded.

Example:

> $ env XDG_CONFIG_DIRS=/foo:/bar strace -e file spacefm 2>&1 | grep -E "(foo)|(bar)"
> access("/foo/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
> access("/foo/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)

> $ env XDG_CONFIG_DIRS=/bar:/foo strace -e file spacefm 2>&1 | grep -E "(foo)|(bar)"
> access("/bar/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)
> access("/bar/gtk-3.0/settings.ini", F_OK) = -1 ENOENT (No such file or directory)

(Issue should be replicable with any other GTK3 program that loads settings.ini, not just spacefm)

A patch that fixes this issue is attached.