[Gnucash-changes] Handle what was thought to be an unexpected case when building gconf

David Hampton hampton at cvs.gnucash.org
Wed Jul 20 13:57:28 EDT 2005


Log Message:
-----------
Handle what was thought to be an unexpected case when building gconf
keys.

Tags:
----
gnucash-gnome2-dev

Modified Files:
--------------
    gnucash/src/core-utils:
        gnc-gconf-utils.c

Revision Data
-------------
Index: gnc-gconf-utils.c
===================================================================
RCS file: /home/cvs/cvsroot/gnucash/src/core-utils/Attic/gnc-gconf-utils.c,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -Lsrc/core-utils/gnc-gconf-utils.c -Lsrc/core-utils/gnc-gconf-utils.c -u -r1.1.2.6 -r1.1.2.7
--- src/core-utils/gnc-gconf-utils.c
+++ src/core-utils/gnc-gconf-utils.c
@@ -161,10 +161,14 @@
     return gnc_gconf_section_name(section);
   }
 
-  g_assert ((*section != '/') && (*name != '/'));
+  if (*section == '/') {
+    if (*name == '/')
+      return g_strjoin(NULL, section, name, NULL);
+    return g_strjoin("/", section, name, NULL);
+  }
 
   section_path = gnc_gconf_section_name(section);
-  key = g_strdup_printf("%s/%s", section_path, name);
+  key = g_strjoin("/", section_path, name, NULL);
   g_free(section_path);
   return key;
 }


More information about the gnucash-changes mailing list