diff options
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | embed/ephy-history.c | 6 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks.c | 6 |
3 files changed, 17 insertions, 2 deletions
@@ -1,5 +1,12 @@ 2003-12-02 Christian Persch <chpe@cvs.gnome.org> + * embed/ephy-history.c: (ephy_history_load): + * src/bookmarks/ephy-bookmarks.c: (ephy_bookmarks_load): + + Fix recovery from corrupted bookmarks and history files. + +2003-12-02 Christian Persch <chpe@cvs.gnome.org> + * src/session.c: (session_load): Check for failed parsing of the session file. Fixes bug #128350. diff --git a/embed/ephy-history.c b/embed/ephy-history.c index 18092876f..10d2f898f 100644 --- a/embed/ephy-history.c +++ b/embed/ephy-history.c @@ -209,7 +209,11 @@ ephy_history_load (EphyHistory *eb) return; doc = xmlParseFile (eb->priv->xml_file); - g_return_if_fail (doc != NULL); + if (doc == NULL) + { + g_warning ("Failed to load history from %s!\n", eb->priv->xml_file); + return; + } root = xmlDocGetRootElement (doc); diff --git a/src/bookmarks/ephy-bookmarks.c b/src/bookmarks/ephy-bookmarks.c index 3da021198..1904fe8d7 100644 --- a/src/bookmarks/ephy-bookmarks.c +++ b/src/bookmarks/ephy-bookmarks.c @@ -320,7 +320,11 @@ ephy_bookmarks_load (EphyBookmarks *eb) return FALSE; doc = xmlParseFile (eb->priv->xml_file); - g_return_val_if_fail (doc != NULL, FALSE); + if (doc == NULL) + { + g_warning ("Failed to load bookmarks file %s!\n", eb->priv->xml_file); + return FALSE; + } root = xmlDocGetRootElement (doc); child = root->children; |