Print file saving errors to the standard output

This commit is contained in:
Brian Vuyk 2008-11-18 23:18:53 +01:00 committed by Christian Dywan
parent 58cb93d900
commit dc59d66eb9
2 changed files with 9 additions and 7 deletions

View file

@ -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);
}

View file

@ -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);