]> spindle.queued.net Git - midori/commitdiff
Handle news feeds with empty date and update them correctly
authorDale Whittaker <dayul@users.sf.net>
Wed, 14 Jul 2010 21:51:39 +0000 (23:51 +0200)
committerChristian Dywan <christian@twotoasts.de>
Wed, 14 Jul 2010 22:06:15 +0000 (00:06 +0200)
extensions/feed-panel/feed-parse.c
extensions/feed-panel/feed-rss.c

index 1f7c41b0fab0aa5333a8a56cd52e121cad179611..9963d0ec21cef55fdafc7692674883a620b2cdb3 100644 (file)
@@ -100,8 +100,11 @@ feed_get_element_date (FeedParser* fparser)
         SoupDate* sdate;
 
         sdate = soup_date_new_from_string (content);
-        date = soup_date_to_time_t (sdate);
-        soup_date_free (sdate);
+        if (sdate)
+        {
+            date = soup_date_to_time_t (sdate);
+            soup_date_free (sdate);
+        }
         g_free (content);
     }
     return ((gint64)date);
index 8351fd530ab4d52cf19f766567841d5d23cdb983..356a582f6abde0ce708770fab58216ccc068c095 100644 (file)
@@ -76,7 +76,7 @@ rss_update (FeedParser* fparser)
                 fparser->node = child;
                 newdate = feed_get_element_date (fparser);
                 fparser->node = node;
-                return (date != newdate);
+                return (date != newdate || date == 0);
             }
         }
         child = child->next;