From: <ebl...@us...> - 2006-12-14 16:18:52
|
Revision: 17997 http://svn.sourceforge.net/gaim/?rev=17997&view=rev Author: eblanton Date: 2006-12-14 08:18:49 -0800 (Thu, 14 Dec 2006) Log Message: ----------- If a buddy icon cannot be retrieved from a conversation, or if the buddy icon write to disk fails to complete, unlink the icon file and abort. This silences a warning, and is more correct to boot. Modified Paths: -------------- trunk/gtk/gtkconv.c Modified: trunk/gtk/gtkconv.c =================================================================== --- trunk/gtk/gtkconv.c 2006-12-14 05:56:50 UTC (rev 17996) +++ trunk/gtk/gtkconv.c 2006-12-14 16:18:49 UTC (rev 17997) @@ -2404,13 +2404,12 @@ icon = gaim_conv_im_get_icon(GAIM_CONV_IM(conv)); data = gaim_buddy_icon_get_data(icon, &len); - if ((len <= 0) || (data == NULL)) { + if ((len <= 0) || (data == NULL) || (fwrite(data, 1, len, fp) != 1)) { gaim_notify_error(gtkconv, NULL, _("Unable to save icon file to disk."), NULL); fclose(fp); + g_unlink(filename); return; } - - fwrite(data, 1, len, fp); fclose(fp); } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |