aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2003-12-02 21:47:42 +0800
committerChristian Persch <chpe@src.gnome.org>2003-12-02 21:47:42 +0800
commitd8873cc1ea89e651fd59364b189ebbd690563ae2 (patch)
tree56c673c5662690b41d75418b4a3dbc3e6e33acdf
parent7c920bceca80ce1d7a7cab35098e1150955c1954 (diff)
downloadgsoc2013-epiphany-d8873cc1ea89e651fd59364b189ebbd690563ae2.tar
gsoc2013-epiphany-d8873cc1ea89e651fd59364b189ebbd690563ae2.tar.gz
gsoc2013-epiphany-d8873cc1ea89e651fd59364b189ebbd690563ae2.tar.bz2
gsoc2013-epiphany-d8873cc1ea89e651fd59364b189ebbd690563ae2.tar.lz
gsoc2013-epiphany-d8873cc1ea89e651fd59364b189ebbd690563ae2.tar.xz
gsoc2013-epiphany-d8873cc1ea89e651fd59364b189ebbd690563ae2.tar.zst
gsoc2013-epiphany-d8873cc1ea89e651fd59364b189ebbd690563ae2.zip
Fix recovery from corrupted bookmarks and history files.
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.
-rw-r--r--ChangeLog7
-rw-r--r--embed/ephy-history.c6
-rw-r--r--src/bookmarks/ephy-bookmarks.c6
3 files changed, 17 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 902aa6e1f..a29efa4bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;