+ /* Now do one more pass over folder contents, and expire comments
+ * whose parents are gone. */
+ for( i = ritem->items; i != NULL; i = i->next ) {
+ item = (FeedItem *)i->data;
+
+ /* Handle comments expiration. */
+ if (feed_item_get_parent_id(item) != NULL) {
+ /* If its parent's id is on list of expired ids, this comment
+ * can go as well. */
+ if (g_slist_find_custom(ctx->expired_ids,
+ feed_item_get_parent_id(item), (GCompareFunc)g_strcmp0)) {
+ debug_print("RSSyl: expiring comment '%s'\n", feed_item_get_id(item));
+ fctx = (RFeedCtx *)item->data;
+ g_remove(fctx->path);
+ }
+ }
+ }
+
+ debug_print("RSSyl: expired %d items\n", g_slist_length(ctx->expired_ids));
+
+ g_slist_free_full(ctx->expired_ids, g_free);