FILE* fp;
GdkPixbuf* pixbuf_scaled;
gint icon_width, icon_height;
+ size_t ret;
if (request->status == KATZE_NET_MOVED)
return;
{
if ((fp = fopen (priv->icon_file, "wb")))
{
- fwrite (request->data, 1, request->length, fp);
+ ret = fwrite (request->data, 1, request->length, fp);
fclose (fp);
+ if ((ret - request->length) != 0)
+ {
+ /* FIXME: We need error handling. If this is called,
+ it means there was a write error */
+ }
pixbuf = gdk_pixbuf_new_from_file (priv->icon_file, NULL);
}
else
gchar* filename)
{
FILE* fp;
+ size_t ret;
if (request->data)
{
/* FIXME: Show an error message if the file cannot be saved */
if ((fp = fopen (filename, "wb")))
{
- fwrite (request->data, 1, request->length, fp);
+ 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 */
+ }
}
}
g_free (filename);
gchar* text_editor;
gint fd;
FILE* fp;
+ size_t ret;
if (request->data)
{
{
if ((fp = fdopen (fd, "w")))
{
- fwrite (request->data, 1, request->length, fp);
+ ret = fwrite (request->data, 1, request->length, fp);
fclose (fp);
+ if ((ret - request->length) != 0)
+ {
+ /* FIXME: We need error handling. If this is called,
+ it means there was a write error */
+ }
g_object_get (browser->settings,
"text-editor", &text_editor, NULL);
sokoke_spawn_program (text_editor, unique_filename);