From d98edca5f2f7a46b3684bcf595e72564db79b12b Mon Sep 17 00:00:00 2001 From: Christian Dywan Date: Mon, 19 Mar 2012 19:09:32 +0100 Subject: [PATCH] Fix one more missing check in midori_view_save_source --- midori/midori-view.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/midori/midori-view.c b/midori/midori-view.c index 70729677..2e149783 100644 --- a/midori/midori-view.c +++ b/midori/midori-view.c @@ -5146,7 +5146,7 @@ midori_view_can_save (MidoriView* view) return FALSE; } -/* static */ gchar* +static gchar* midori_view_get_uri_extension (const gchar* uri) { gchar* slash; @@ -5248,10 +5248,11 @@ midori_view_save_source (MidoriView* view, { ret = fwrite (data ? data->str : "", 1, data ? data->len : 0, fp); fclose (fp); - if ((ret - data->len) != 0) + if (ret - (data ? data->len : 0) != 0) { - g_warning ("Error writing to file %s " - "in midori_browser_source_transfer_cb()", unique_filename); + midori_view_add_info_bar (view, GTK_MESSAGE_ERROR, + unique_filename, NULL, view, + GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL); katze_assign (unique_filename, NULL); } } -- 2.39.5