aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Toshok <toshok@ximian.com>2003-02-27 06:37:40 +0800
committerChris Toshok <toshok@src.gnome.org>2003-02-27 06:37:40 +0800
commitbf636265e06e47f6eb8273dac33111688af930e8 (patch)
treef112d5f2aa77e387b0de374196b6f460ec6f4ab0
parentb91b7c9a0bfb4f2dd358cc1bd6a635ef72cf1768 (diff)
downloadgsoc2013-evolution-bf636265e06e47f6eb8273dac33111688af930e8.tar
gsoc2013-evolution-bf636265e06e47f6eb8273dac33111688af930e8.tar.gz
gsoc2013-evolution-bf636265e06e47f6eb8273dac33111688af930e8.tar.bz2
gsoc2013-evolution-bf636265e06e47f6eb8273dac33111688af930e8.tar.lz
gsoc2013-evolution-bf636265e06e47f6eb8273dac33111688af930e8.tar.xz
gsoc2013-evolution-bf636265e06e47f6eb8273dac33111688af930e8.tar.zst
gsoc2013-evolution-bf636265e06e47f6eb8273dac33111688af930e8.zip
make this more robust - only assume it's a folderlistitem node if the name
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". svn path=/trunk/; revision=20079
-rw-r--r--shell/ChangeLog6
-rw-r--r--shell/e-folder-list.c11
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;