RSSyl: fix OPML import creating incorrect folder hierarchy

This commit is contained in:
Andrej Kacian 2014-08-13 22:32:01 +02:00
parent 06165d299c
commit fa8fd46c1f

View file

@ -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);