From fa8fd46c1f9945fd21ab78e5eaeaf89fa6e9df15 Mon Sep 17 00:00:00 2001 From: Andrej Kacian Date: Wed, 13 Aug 2014 22:32:01 +0200 Subject: [PATCH] RSSyl: fix OPML import creating incorrect folder hierarchy --- 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 index d0c2ef99f..bb1104468 100644 --- 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 + * tag in OPML's XML structure. Topmost outlines are under + * and , hence 2. */ + ctx->depth = rssyl_folder_depth(item) + 2; ctx->current = NULL; ctx->current = g_slist_append(ctx->current, item);