Fix one more missing check in midori_view_save_source
This commit is contained in:
parent
edc88b7b47
commit
d98edca5f2
1 changed files with 5 additions and 4 deletions
|
@ -5146,7 +5146,7 @@ midori_view_can_save (MidoriView* view)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* static */ gchar*
|
static gchar*
|
||||||
midori_view_get_uri_extension (const gchar* uri)
|
midori_view_get_uri_extension (const gchar* uri)
|
||||||
{
|
{
|
||||||
gchar* slash;
|
gchar* slash;
|
||||||
|
@ -5248,10 +5248,11 @@ midori_view_save_source (MidoriView* view,
|
||||||
{
|
{
|
||||||
ret = fwrite (data ? data->str : "", 1, data ? data->len : 0, fp);
|
ret = fwrite (data ? data->str : "", 1, data ? data->len : 0, fp);
|
||||||
fclose (fp);
|
fclose (fp);
|
||||||
if ((ret - data->len) != 0)
|
if (ret - (data ? data->len : 0) != 0)
|
||||||
{
|
{
|
||||||
g_warning ("Error writing to file %s "
|
midori_view_add_info_bar (view, GTK_MESSAGE_ERROR,
|
||||||
"in midori_browser_source_transfer_cb()", unique_filename);
|
unique_filename, NULL, view,
|
||||||
|
GTK_STOCK_OK, GTK_RESPONSE_ACCEPT, NULL);
|
||||||
katze_assign (unique_filename, NULL);
|
katze_assign (unique_filename, NULL);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue