diff options
author | Marco Pesenti Gritti <marco@gnome.org> | 2004-07-22 16:45:14 +0800 |
---|---|---|
committer | Marco Pesenti Gritti <marco@src.gnome.org> | 2004-07-22 16:45:14 +0800 |
commit | 561c5a9432b239aee5581ef83b0f38c5eeecd30c (patch) | |
tree | 72952dbd79fe236ca5e38194898fd2664268ecd6 /src | |
parent | 370a95a23d6475cffcb1a82a81ee65c683371853 (diff) | |
download | gsoc2013-epiphany-561c5a9432b239aee5581ef83b0f38c5eeecd30c.tar.gz gsoc2013-epiphany-561c5a9432b239aee5581ef83b0f38c5eeecd30c.tar.zst gsoc2013-epiphany-561c5a9432b239aee5581ef83b0f38c5eeecd30c.zip |
Handle the bookmark in the root folder case correctly. Fix #145611
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
Diffstat (limited to 'src')
-rw-r--r-- | src/bookmarks/ephy-bookmarks-import.c | 24 |
1 files changed, 14 insertions, 10 deletions
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; |