[Xfce4-commits] <midori:master> Make sure the cache folder is there initially
Christian Dywan
noreply at xfce.org
Thu Oct 22 03:02:01 CEST 2009
Updating branch refs/heads/master
to 6ff3e3a17d5f9b85ff115bd2a3384350cbb69525 (commit)
from 6a7059ae5f78a5d5975c82e07ca91ca300ad20de (commit)
commit 6ff3e3a17d5f9b85ff115bd2a3384350cbb69525
Author: Christian Dywan <christian at twotoasts.de>
Date: Thu Oct 22 02:48:22 2009 +0200
Make sure the cache folder is there initially
extensions/web-cache.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/extensions/web-cache.c b/extensions/web-cache.c
index 4d41d42..02d2f36 100644
--- a/extensions/web-cache.c
+++ b/extensions/web-cache.c
@@ -36,8 +36,7 @@ web_cache_get_cached_path (MidoriExtension* extension,
/* cache_path = midori_extension_get_string (extension, "path"); */
if (!cache_path)
- cache_path = g_build_filename (g_get_user_cache_dir (),
- PACKAGE_NAME, "web", NULL);
+ cache_path = midori_extension_get_string (extension, "path");
checksum = g_compute_checksum_for_string (G_CHECKSUM_MD5, uri, -1);
folder = g_strdup_printf ("%c%c", checksum[0], checksum[1]);
sub_path = g_build_path (G_DIR_SEPARATOR_S, cache_path, folder, NULL);
@@ -356,11 +355,14 @@ static void
web_cache_activate_cb (MidoriExtension* extension,
MidoriApp* app)
{
+ const gchar* cache_path = midori_extension_get_string (extension, "path");
KatzeArray* browsers;
MidoriBrowser* browser;
guint i;
SoupSession* session = webkit_get_default_session ();
+ katze_mkdir_with_parents (cache_path, 0700);
+
g_signal_connect (session, "request-queued",
G_CALLBACK (web_cache_session_request_queued_cb), extension);
g_signal_connect (session, "request-unqueued",
More information about the Xfce4-commits
mailing list