[epiphany] ephy-favicon-cache: remove failed download files
- From: Diego Escalante Urrelo <diegoe src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [epiphany] ephy-favicon-cache: remove failed download files
- Date: Mon, 30 Aug 2010 16:59:43 +0000 (UTC)
commit 2544c3afd640d28782394e6a031f79ab6d90a641
Author: Diego Escalante Urrelo <descalante igalia com>
Date: Sun Aug 22 16:03:32 2010 -0500
ephy-favicon-cache: remove failed download files
Bug #618627
embed/ephy-favicon-cache.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index db41eca..23e528b 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]