diff options
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | src/bookmarks/ephy-bookmarks-import.c | 9 |
2 files changed, 14 insertions, 3 deletions
@@ -1,3 +1,11 @@ +2004-02-28 Christian Persch <chpe@cvs.gnome.org> + + * src/bookmarks/ephy-bookmarks-import.c: (xbel_parse_folder), + (ephy_bookmarks_import_xbel): + + If a folder has no name, don't tag its bookmarks with "Untitled" + keyword, just skip it. + 2004-02-28 Marco Pesenti Gritti <marco@gnome.org> * embed/mozilla/ContentHandler.cpp: diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c index 5395d625c..78326a0aa 100644 --- a/src/bookmarks/ephy-bookmarks-import.c +++ b/src/bookmarks/ephy-bookmarks-import.c @@ -369,9 +369,9 @@ xbel_parse_folder (EphyBookmarks *eb, xmlTextReaderPtr reader) } /* tag all bookmarks in the list with keyword %title */ - if (title == NULL) + if (title == NULL || title[0] == '\0') { - title = xmlStrdup (_("Untitled")); + return list; } keyword = ephy_bookmarks_find_keyword (eb, title, FALSE); @@ -669,7 +669,10 @@ ephy_bookmarks_import_xbel (EphyBookmarks *bookmarks, } reader = xmlNewTextReaderFilename (filename); - g_return_val_if_fail (reader != NULL, FALSE); + if (reader == NULL) + { + return FALSE; + } list = xbel_parse_folder (bookmarks, reader); |