diff libpurple/prefs.c @ 18488:58d1df75c91c

Return the complete paths of the child prefs.
author Sadrul Habib Chowdhury <imadil@gmail.com>
date Wed, 11 Jul 2007 19:27:39 +0000
parents 8af9ebae439c
children 9f7587b86b0d
line wrap: on
line diff
--- a/libpurple/prefs.c	Wed Jul 11 18:57:46 2007 +0000
+++ b/libpurple/prefs.c	Wed Jul 11 19:27:39 2007 +0000
@@ -1330,12 +1330,15 @@
 {
 	GList * list = NULL;
 	struct purple_pref *pref = find_pref(name), *child;
+	char sep[2] = "\0\0";;
 
 	if (pref == NULL)
 		return NULL;
 
+	if (name[strlen(name) - 1] != '/')
+		sep[0] = '/';
 	for (child = pref->first_child; child; child = child->sibling) {
-		list = g_list_append(list, g_strdup(child->name));
+		list = g_list_append(list, g_strdup_printf("%s%s%s", name, sep, child->name));
 	}
 	return list;