diff options
-rw-r--r-- | shell/ChangeLog | 6 | ||||
-rw-r--r-- | shell/e-folder-list.c | 11 |
2 files changed, 13 insertions, 4 deletions
diff --git a/shell/ChangeLog b/shell/ChangeLog index b8ea1a0f27..942c4b2e93 100644 --- a/shell/ChangeLog +++ b/shell/ChangeLog @@ -1,3 +1,9 @@ +2003-02-26 Chris Toshok <toshok@ximian.com> + + * e-folder-list.c (e_folder_list_parse_xml): make this more robust + - only assume it's a folderlistitem node if the name of the node + is "folder". + 2003-02-26 Jeffrey Stedfast <fejj@ximian.com> * e-config-upgrade.c: Change the type of load_http_images to INT diff --git a/shell/e-folder-list.c b/shell/e-folder-list.c index 6b7ee32c93..fff4d6c4aa 100644 --- a/shell/e-folder-list.c +++ b/shell/e-folder-list.c @@ -490,10 +490,13 @@ e_folder_list_parse_xml (char *xml) items = g_new (EFolderListItem, i + 1); - for (node = root->xmlChildrenNode, i = 0; node; node = node->next, i++) { - items[i].uri = e_xml_get_string_prop_by_name_with_default (node, "uri", ""); - items[i].physical_uri = e_xml_get_string_prop_by_name_with_default (node, "physical-uri", ""); - items[i].display_name = e_xml_get_string_prop_by_name_with_default (node, "display-name", ""); + for (node = root->xmlChildrenNode, i = 0; node; node = node->next) { + if (node->name && !strcmp (node->name, "folder")) { + items[i].uri = e_xml_get_string_prop_by_name_with_default (node, "uri", ""); + items[i].physical_uri = e_xml_get_string_prop_by_name_with_default (node, "physical-uri", ""); + items[i].display_name = e_xml_get_string_prop_by_name_with_default (node, "display-name", ""); + i++; + } } items[i].uri = NULL; items[i].physical_uri = NULL; |