From 46f5a689ef2b9b8bbb17686b15001e64ccb0c678 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Sun, 24 Aug 2003 18:20:58 +0000 Subject: Fix the logic in the version-mismatch case. 2003-08-24 Christian Persch * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_load): Fix the logic in the version-mismatch case. --- ChangeLog | 6 ++++++ src/bookmarks/ephy-bookmarks.c | 6 ++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 0ea015421..658fd4b05 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2003-08-24 Christian Persch + + * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_load): + + Fix the logic in the version-mismatch case. + 2003-08-24 Anders Carlsson * src/ephy-spinner-action.c (toolbar_style_sync): Use a diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index 2ba82aa78..036113673 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -324,17 +324,19 @@ ephy_bookmarks_load (EphyBookmarks *eb) g_return_val_if_fail (doc != NULL, FALSE); root = xmlDocGetRootElement (doc); - + child = root->children; + tmp = xmlGetProp (root, "version"); if (tmp != NULL && strcmp (tmp, EPHY_BOOKMARKS_XML_VERSION) != 0) { g_warning ("Old bookmarks database format detected"); + child = NULL; result = FALSE; } g_free (tmp); - for (child = root->children; child != NULL; child = child->next) + for (; child != NULL; child = child->next) { EphyNode *node; -- cgit v1.2.3