aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog8
-rw-r--r--src/bookmarks/ephy-bookmarks-import.c24
2 files changed, 22 insertions, 10 deletions
diff --git a/ChangeLog b/ChangeLog
index cec5bc2b9..665bad09a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2004-07-22 Marco Pesenti Gritti <marco@gnome.org>
+
+ * src/bookmarks/ephy-bookmarks-import.c:
+ (ephy_bookmarks_import_mozilla):
+
+ Handle the bookmark in the root folder case
+ correctly. Fix #145611
+
2004-07-22 Christian Persch <chpe@cvs.gnome.org>
* embed/mozilla/GtkNSSClientAuthDialogs.cpp:
diff --git a/src/bookmarks/ephy-bookmarks-import.c b/src/bookmarks/ephy-bookmarks-import.c
index 014f69b97..85e010575 100644
--- a/src/bookmarks/ephy-bookmarks-import.c
+++ b/src/bookmarks/ephy-bookmarks-import.c
@@ -682,7 +682,6 @@ ephy_bookmarks_import_mozilla (EphyBookmarks *bookmarks,
FILE *bf; /* bookmark file */
GString *name, *url;
char *parsedname, *topic;
- EphyNode *keyword;
GList *folders = NULL;
if (eel_gconf_get_boolean (CONF_LOCKDOWN_DISABLE_BOOKMARK_EDITING)) return FALSE;
@@ -725,20 +724,25 @@ ephy_bookmarks_import_mozilla (EphyBookmarks *bookmarks,
node = ephy_bookmarks_find_bookmark (bookmarks, url->str);
}
- topic = folders_list_to_topic_name (folders);
- keyword = ephy_bookmarks_find_keyword (bookmarks, topic, FALSE);
-
- if (keyword == NULL)
- {
- keyword = ephy_bookmarks_add_keyword (bookmarks, topic);
- }
+ g_return_val_if_fail (node != NULL, FALSE);
- if (node != NULL && keyword != NULL)
+ if (folders != NULL)
{
+ EphyNode *keyword;
+
+ topic = folders_list_to_topic_name (folders);
+ g_return_val_if_fail (topic != NULL, FALSE);
+
+ keyword = ephy_bookmarks_find_keyword (bookmarks, topic, FALSE);
+ if (keyword == NULL)
+ {
+ keyword = ephy_bookmarks_add_keyword (bookmarks, topic);
+ }
+ g_free (topic);
+
ephy_bookmarks_set_keyword (bookmarks, keyword, node);
}
- g_free (topic);
g_free (parsedname);
break;