summaryrefslogtreecommitdiff
path: root/common
diff options
context:
space:
mode:
authorMichael Terry <michael.terry@canonical.com>2014-03-17 23:14:51 -0400
committerMichael Terry <michael.terry@canonical.com>2014-03-17 23:14:51 -0400
commit34e0db531ad1f39fc99e3e3c7b86590b74460935 (patch)
tree0855a595cac2c40511eb19dda07d8fc3cc07ef6b /common
parent4a65ff1df5a1649edf8f3f4922d1319504802be7 (diff)
downloadlightdm-34e0db531ad1f39fc99e3e3c7b86590b74460935.tar.gz
Reverse order of directory loading for a given XDG variable
Diffstat (limited to 'common')
-rw-r--r--common/configuration.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/common/configuration.c b/common/configuration.c
index 524b33f4..8502d6d1 100644
--- a/common/configuration.c
+++ b/common/configuration.c
@@ -145,7 +145,9 @@ load_config_directories (const gchar * const *dirs, GList **messages)
{
gint i;
- for (i = 0; dirs[i]; i++)
+ // Load in reverse order, because XDG_* fields are preference-ordered and
+ // the directories in front should override directories in back.
+ for (i = g_strv_length ((gchar **)dirs) - 1; i >= 0; i--)
{
gchar *full_dir = g_build_filename (dirs[i], "lightdm", "lightdm.conf.d", NULL);
if (messages)