From: Brian Vuyk Date: Tue, 18 Nov 2008 22:18:53 +0000 (+0100) Subject: Print file saving errors to the standard output X-Git-Url: https://spindle.queued.net/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc59d66eb9ea8a1a3a8eefdaf9bb15bef8e031cf;p=midori Print file saving errors to the standard output --- diff --git a/katze/katze-net.c b/katze/katze-net.c index d1e88eee..0df4e2dc 100644 --- a/katze/katze-net.c +++ b/katze/katze-net.c @@ -433,8 +433,8 @@ katze_net_icon_transfer_cb (KatzeNetRequest* request, fclose (fp); if ((ret - request->length) != 0) { - /* FIXME: We need error handling. If this is called, - it means there was a write error */ + g_warning ("Error writing to file %s " + "in katze_net_icon_transfer_cb()", priv->icon_file); } pixbuf = gdk_pixbuf_new_from_file (priv->icon_file, NULL); } diff --git a/midori/midori-browser.c b/midori/midori-browser.c index a6a6f646..903f6716 100644 --- a/midori/midori-browser.c +++ b/midori/midori-browser.c @@ -641,15 +641,16 @@ midori_browser_save_transfer_cb (KatzeNetRequest* request, if (request->data) { - /* FIXME: Show an error message if the file cannot be saved */ if ((fp = fopen (filename, "wb"))) { ret = fwrite (request->data, 1, request->length, fp); fclose (fp); if ((ret - request->length) != 0) { - /* FIXME: We need error handling. If this is called, - i means there was a write error */ + /* Once we have a download interface this should be + indicated graphically. */ + g_warning ("Error writing to file %s " + "in midori_browser_save_transfer_cb", filename); } } } @@ -1866,8 +1867,9 @@ midori_browser_source_transfer_cb (KatzeNetRequest* request, fclose (fp); if ((ret - request->length) != 0) { - /* FIXME: We need error handling. If this is called, - it means there was a write error */ + /* FIXME: Show an error in the graphical interface */ + g_warning ("Error writing to file %s " + "in midori_browser_source_transfer_cb()", filename); } g_object_get (browser->settings, "text-editor", &text_editor, NULL);