| 2402 } |
2402 } |
| 2403 |
2403 |
| 2404 icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); |
2404 icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); |
| 2405 data = gaim_buddy_icon_get_data(icon, &len); |
2405 data = gaim_buddy_icon_get_data(icon, &len); |
| 2406 |
2406 |
| 2407 if ((len <= 0) || (data == NULL) || (fwrite(data, 1, len, fp) != 1)) { |
2407 if ((len <= 0) || (data == NULL) || (fwrite(data, 1, len, fp) != len)) { |
| 2408 gaim_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL); |
2408 gaim_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL); |
| 2409 fclose(fp); |
2409 fclose(fp); |
| 2410 g_unlink(filename); |
2410 g_unlink(filename); |
| 2411 return; |
2411 return; |
| 2412 } |
2412 } |