RSSyl: fix deleted item checking when modified or published time is missing
authorAndrej Kacian <ticho@claws-mail.org>
Fri, 23 Feb 2018 21:27:35 +0000 (22:27 +0100)
committerAndrej Kacian <ticho@claws-mail.org>
Fri, 23 Feb 2018 21:27:35 +0000 (22:27 +0100)
Fixes bug #3971.

src/plugins/rssyl/rssyl_deleted.c

index ef2a5c13b11367b06e9a7961cb7aaa16d04ee646..59910938873de4ce0083935cfa3c9d1ae4647efc 100644 (file)
@@ -310,13 +310,15 @@ static void _rssyl_deleted_expire_func_f(gpointer data, gpointer user_data)
                return;
 
        /* time of publishing, ... */
-       if (ctx->ditem->date_published != feed_item_get_date_published(fitem))
+       if (ctx->ditem->date_published != -1 &&
+                       ctx->ditem->date_published != feed_item_get_date_published(fitem))
                return;
 
        /* and the time of last modification must be greater
         * (this means that the item was updated since deletion, and possibly
         * contains new data, so we add it again) */
-       if (ctx->ditem->date_modified != feed_item_get_date_modified(fitem))
+       if (ctx->ditem->date_modified != -1 &&
+                       ctx->ditem->date_modified != feed_item_get_date_modified(fitem))
                return;
 
        ctx->delete = FALSE;