aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDiego Escalante Urrelo <descalante@igalia.com>2010-08-23 05:03:32 +0800
committerDiego Escalante Urrelo <descalante@igalia.com>2010-08-31 04:43:09 +0800
commitdc0953e42d8955bdb93e726fc4d232d9332b4117 (patch)
tree5df069853d7508c12f9d6802636623376191f45a
parent1db0f7eb3b31540b354c81c52795da4425d34f60 (diff)
downloadgsoc2013-epiphany-dc0953e42d8955bdb93e726fc4d232d9332b4117.tar
gsoc2013-epiphany-dc0953e42d8955bdb93e726fc4d232d9332b4117.tar.gz
gsoc2013-epiphany-dc0953e42d8955bdb93e726fc4d232d9332b4117.tar.bz2
gsoc2013-epiphany-dc0953e42d8955bdb93e726fc4d232d9332b4117.tar.lz
gsoc2013-epiphany-dc0953e42d8955bdb93e726fc4d232d9332b4117.tar.xz
gsoc2013-epiphany-dc0953e42d8955bdb93e726fc4d232d9332b4117.tar.zst
gsoc2013-epiphany-dc0953e42d8955bdb93e726fc4d232d9332b4117.zip
ephy-favicon-cache: remove failed download files
Bug #618627
-rw-r--r--embed/ephy-favicon-cache.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index db41eca51..23e528b78 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -508,9 +508,15 @@ favicon_download_status_changed_cb (WebKitDownload *download,
g_hash_table_remove (cache->priv->downloads_hash, url);
- /* TODO: remove a partially downloaded file */
/* FIXME: re-schedule to try again after n days? */
+ file = g_file_new_for_uri (destination);
+ if (g_file_query_exists (file, NULL))
+ {
+ LOG ("Deleting incomplete favicon download");
+ g_file_delete (file, NULL, NULL);
+ }
+ g_object_unref (file);
g_object_unref (download);
cache->priv->dirty = TRUE;