commit fa8fd46c1f9945fd21ab78e5eaeaf89fa6e9df15 parent 06165d299c68c18a4f332a062c77f18277ee47ed Author: Andrej Kacian <ticho@claws-mail.org> Date: Wed, 13 Aug 2014 22:32:01 +0200 RSSyl: fix OPML import creating incorrect folder hierarchy Diffstat:
| M | src/plugins/rssyl/rssyl_cb_menu.c | | | 5 | ++++- |
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/plugins/rssyl/rssyl_cb_menu.c b/src/plugins/rssyl/rssyl_cb_menu.c @@ -352,7 +352,10 @@ void rssyl_import_feed_list_cb(GtkAction *action, gpointer data) ctx = malloc( sizeof(OPMLImportCtx) ); ctx->failures = 0; - ctx->depth = rssyl_folder_depth(item); + /* This needs to be +2, since we will be comparing it to depth of + * <outline> tag in OPML's XML structure. Topmost outlines are under + * <opml> and <body>, hence 2. */ + ctx->depth = rssyl_folder_depth(item) + 2; ctx->current = NULL; ctx->current = g_slist_append(ctx->current, item);