Print file saving errors to the standard output
This commit is contained in:
parent
58cb93d900
commit
dc59d66eb9
2 changed files with 9 additions and 7 deletions
|
@ -433,8 +433,8 @@ katze_net_icon_transfer_cb (KatzeNetRequest* request,
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
if ((ret - request->length) != 0)
|
if ((ret - request->length) != 0)
|
||||||
{
|
{
|
||||||
/* FIXME: We need error handling. If this is called,
|
g_warning ("Error writing to file %s "
|
||||||
it means there was a write error */
|
"in katze_net_icon_transfer_cb()", priv->icon_file);
|
||||||
}
|
}
|
||||||
pixbuf = gdk_pixbuf_new_from_file (priv->icon_file, NULL);
|
pixbuf = gdk_pixbuf_new_from_file (priv->icon_file, NULL);
|
||||||
}
|
}
|
||||||
|
|
|
@ -641,15 +641,16 @@ midori_browser_save_transfer_cb (KatzeNetRequest* request,
|
||||||
|
|
||||||
if (request->data)
|
if (request->data)
|
||||||
{
|
{
|
||||||
/* FIXME: Show an error message if the file cannot be saved */
|
|
||||||
if ((fp = fopen (filename, "wb")))
|
if ((fp = fopen (filename, "wb")))
|
||||||
{
|
{
|
||||||
ret = fwrite (request->data, 1, request->length, fp);
|
ret = fwrite (request->data, 1, request->length, fp);
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
if ((ret - request->length) != 0)
|
if ((ret - request->length) != 0)
|
||||||
{
|
{
|
||||||
/* FIXME: We need error handling. If this is called,
|
/* Once we have a download interface this should be
|
||||||
i means there was a write error */
|
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);
|
fclose (fp);
|
||||||
if ((ret - request->length) != 0)
|
if ((ret - request->length) != 0)
|
||||||
{
|
{
|
||||||
/* FIXME: We need error handling. If this is called,
|
/* FIXME: Show an error in the graphical interface */
|
||||||
it means there was a write error */
|
g_warning ("Error writing to file %s "
|
||||||
|
"in midori_browser_source_transfer_cb()", filename);
|
||||||
}
|
}
|
||||||
g_object_get (browser->settings,
|
g_object_get (browser->settings,
|
||||||
"text-editor", &text_editor, NULL);
|
"text-editor", &text_editor, NULL);
|
||||||
|
|
Loading…
Reference in a new issue