summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2010-01-28 20:42:23 +0100
committerNick Schermer <nick@xfce.org>2010-05-13 20:42:25 +0200
commitb686270b38b6199eec080a7faee6b1e4758f28c0 (patch)
treeb048ef29199ceac341a2ebf7b0b25300f32aa508
parent8c6f3e23de11b9d46acc7f3db4937c026455e6af (diff)
downloadxfconf-b686270b38b6199eec080a7faee6b1e4758f28c0.tar.gz
Merge xml files in reversed order (bug #6079).
-rw-r--r--xfconfd/xfconf-backend-perchannel-xml.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/xfconfd/xfconf-backend-perchannel-xml.c b/xfconfd/xfconf-backend-perchannel-xml.c
index d764e58..98fa0c3 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -1644,7 +1644,7 @@ xfconf_backend_perchannel_xml_load_channel(XfconfBackendPerchannelXml *xbpx,
{
XfconfChannel *channel = NULL;
gchar *filename_stem, **filenames, *user_file;
- gint i;
+ gint i, length;
XfconfProperty *prop;
TRACE("entering");
@@ -1669,9 +1669,11 @@ xfconf_backend_perchannel_xml_load_channel(XfconfBackendPerchannelXml *xbpx,
prop->name = g_strdup("/");
channel->properties = g_node_new(prop);
- /* read in system files */
- for(i = 0; filenames[i]; ++i) {
- if(user_file && !strcmp(filenames[i], user_file))
+ /* read in system files, we do this in reversed order to properly
+ * follow the xdg spec, see bug #6079 for more information */
+ length = g_strv_length(filenames);
+ for(i = length - 1; i >= 0; --i) {
+ if(!g_strcmp0(user_file, filenames[i]))
continue;
xfconf_backend_perchannel_xml_merge_file(xbpx, filenames[i], TRUE,
channel, NULL);