From b170dd688a3d45fea4b74954328379e91a645ebe Mon Sep 17 00:00:00 2001 From: Alexander Butenko Date: Fri, 2 Jul 2010 11:13:55 -0400 Subject: [PATCH] Delete bookmarks from the folder they reside in --- panels/midori-bookmarks.c | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/panels/midori-bookmarks.c b/panels/midori-bookmarks.c index 2624f22a..b8c9b69c 100644 --- a/panels/midori-bookmarks.c +++ b/panels/midori-bookmarks.c @@ -231,12 +231,17 @@ midori_bookmarks_remove_item_from_db (sqlite3* db, if (KATZE_ITEM_IS_BOOKMARK (item)) sqlcmd = sqlite3_mprintf ( - "DELETE FROM bookmarks WHERE uri = '%q'", - katze_item_get_uri (item)); + "DELETE FROM bookmarks WHERE uri = '%q' " + " AND folder = '%q'", + katze_item_get_uri (item), + katze_item_get_meta_string (item, "folder")); + else sqlcmd = sqlite3_mprintf ( - "DELETE FROM bookmarks WHERE title = '%q'", - katze_item_get_name (item)); + "DELETE FROM bookmarks WHERE title = '%q'" + " AND folder = '%q'", + katze_item_get_name (item), + katze_item_get_meta_string (item, "folder")); if (sqlite3_exec (db, sqlcmd, NULL, NULL, &errmsg) != SQLITE_OK) { -- 2.39.5