From c21807bc4a4453986e1f81c31c68b71e236bacd2 Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Fri, 12 Feb 2010 02:16:27 +0100 Subject: [PATCH] Use g_unlink for G_FILE_CREATE_REPLACE_DESTINATION with Glib < 2.20 --- extensions/web-cache.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/extensions/web-cache.c b/extensions/web-cache.c index 4e4d07cd..33c34299 100644 --- a/extensions/web-cache.c +++ b/extensions/web-cache.c @@ -323,8 +323,14 @@ web_cache_mesage_got_headers_cb (SoupMessage* msg, if (!web_cache_save_headers (msg, filename)) return; + #if GLIB_CHECK_VERSION (2, 20, 0) ostream = (GOutputStream*)g_file_append_to (file, G_FILE_CREATE_PRIVATE | G_FILE_CREATE_REPLACE_DESTINATION, NULL, NULL); + #else + g_unlink (filename); + ostream = (GOutputStream*)g_file_append_to (file, + G_FILE_CREATE_PRIVATE, NULL, NULL); + #endif g_object_unref (file); if (!ostream) -- 2.39.5