Fix bug #3126 “libravatar: do not collect empty files”
authorChristian Hesse <mail@eworm.de>
Wed, 26 Mar 2014 21:27:53 +0000 (22:27 +0100)
committerRicardo Mones <ricardo@mones.org>
Thu, 27 Mar 2014 23:25:40 +0000 (00:25 +0100)
Signed-off-by: Ricardo Mones <ricardo@mones.org>
src/plugins/libravatar/libravatar.c

index 62d7dc3..a7f9827 100644 (file)
@@ -171,7 +171,7 @@ static GtkWidget *image_widget_from_url(const gchar *url, const gchar *md5)
                else
                        image = image_widget_from_filename(filename);
 
-               if (!libravatarprefs.cache_icons) {
+               if (!libravatarprefs.cache_icons || filesize == 0) {
                        if (g_unlink(filename) < 0)
                                g_warning("failed to delete cache file %s\n", filename);
                }