aboutsummaryrefslogtreecommitdiffstats
path: root/embed
diff options
context:
space:
mode:
authorMarco Pesenti Gritti <marco@it.gnome.org>2003-01-10 22:45:29 +0800
committerMarco Pesenti Gritti <mpeseng@src.gnome.org>2003-01-10 22:45:29 +0800
commitf3abccbb20e7258eef7e88d47e40e20e59473f65 (patch)
tree2c2a79a7be1a0caa2896ebdb7860da6142b13fd3 /embed
parent678e71b94d7221c659bcc93332a071dc56d10d30 (diff)
downloadgsoc2013-epiphany-f3abccbb20e7258eef7e88d47e40e20e59473f65.tar
gsoc2013-epiphany-f3abccbb20e7258eef7e88d47e40e20e59473f65.tar.gz
gsoc2013-epiphany-f3abccbb20e7258eef7e88d47e40e20e59473f65.tar.bz2
gsoc2013-epiphany-f3abccbb20e7258eef7e88d47e40e20e59473f65.tar.lz
gsoc2013-epiphany-f3abccbb20e7258eef7e88d47e40e20e59473f65.tar.xz
gsoc2013-epiphany-f3abccbb20e7258eef7e88d47e40e20e59473f65.tar.zst
gsoc2013-epiphany-f3abccbb20e7258eef7e88d47e40e20e59473f65.zip
Download favicon only when it's not already on disk. As side effect avoid
2003-01-10 Marco Pesenti Gritti <marco@it.gnome.org> * embed/ephy-favicon-cache.c: (ephy_favicon_cache_insert_from_url): Download favicon only when it's not already on disk. As side effect avoid most crashes on exit. Still need to really fix that.
Diffstat (limited to 'embed')
-rw-r--r--embed/ephy-favicon-cache.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/embed/ephy-favicon-cache.c b/embed/ephy-favicon-cache.c
index fd3c4192b..d289fd4ab 100644
--- a/embed/ephy-favicon-cache.c
+++ b/embed/ephy-favicon-cache.c
@@ -324,8 +324,8 @@ ephy_favicon_cache_dest (EphyFaviconCache *cache, const char *url)
void
ephy_favicon_cache_insert_from_url (EphyFaviconCache *cache,
- const char *url,
- const char *favicon_url)
+ const char *url,
+ const char *favicon_url)
{
EphyEmbedPersist *persist;
char *dest;
@@ -337,6 +337,8 @@ ephy_favicon_cache_insert_from_url (EphyFaviconCache *cache,
dest = ephy_favicon_cache_dest (cache, favicon_url);
g_return_if_fail (dest != NULL);
+ if (g_file_test (dest, G_FILE_TEST_EXISTS)) return;
+
persist = ephy_embed_persist_new (NULL);
ephy_embed_persist_set_max_size (persist, 100);