From: Dana Jansens Date: Wed, 30 May 2007 14:39:06 +0000 (+0000) Subject: create new nodes with attributes correctly X-Git-Tag: release-2.0.2~140 X-Git-Url: http://git.openbox.org/?a=commitdiff_plain;h=325832ff72c5b124cfb11223a387bc86e9ffa380;p=dana%2Fobconf.git create new nodes with attributes correctly --- diff --git a/src/tree.c b/src/tree.c index ed51f0b..a9ccefe 100644 --- a/src/tree.c +++ b/src/tree.c @@ -57,8 +57,11 @@ xmlNodePtr tree_get_node(const gchar *path, const gchar *def) if (!c) { gint i; + gchar **attrs; - c = xmlNewTextChild(n, NULL, *it, *next ? NULL : def); + attrs = g_strsplit(*it, ":", 0); + + c = xmlNewTextChild(n, NULL, *it, *next ? NULL : attrs[0]); for (i = 1; attrs[i]; ++i) { gchar **eq = g_strsplit(attrs[i], "=", 2);