summaryrefslogtreecommitdiff
path: root/xfconfd
diff options
context:
space:
mode:
authorNick Schermer <nick@xfce.org>2010-01-28 20:42:23 +0100
committerNick Schermer <nick@xfce.org>2010-01-28 20:43:53 +0100
commit13e913b7683da0d3eb1c9d78ac0908d62368e5d5 (patch)
tree8fdaf597048c07d3bba3048430c79a6dbb31788d /xfconfd
parentcdadb1e4cc22dbf480843482dea3335b3a966534 (diff)
downloadxfconf-13e913b7683da0d3eb1c9d78ac0908d62368e5d5.tar.gz
Merge xml files in reversed order (bug #6079).
Diffstat (limited to 'xfconfd')
-rw-r--r--xfconfd/xfconf-backend-perchannel-xml.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xfconfd/xfconf-backend-perchannel-xml.c b/xfconfd/xfconf-backend-perchannel-xml.c
index 2df722e..a0d1b38 100644
--- a/xfconfd/xfconf-backend-perchannel-xml.c
+++ b/xfconfd/xfconf-backend-perchannel-xml.c
@@ -1664,7 +1664,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");
@@ -1689,9 +1689,10 @@ 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 */
+ 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);