pidgin: 23069829: Just write out the buddy icon file; ther...

evands at pidgin.im evands at pidgin.im
Tue Mar 4 20:21:26 EST 2008


-----------------------------------------------------------------
Revision: 23069829f47d323660bf3b3205d61f0156256a2b
Ancestor: 6bbe6f7a6765c8a0f9b27b8723b3833656a6a2fa
Author: evands at pidgin.im
Date: 2008-03-04T23:53:44
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/23069829f47d323660bf3b3205d61f0156256a2b

Modified files:
        libpurple/buddyicon.c

ChangeLog: 

Just write out the buddy icon file; there's no need to check to see if it exists. This is for the cache, and if the blist.xml gets out of sync with the cache on disk (for example, because the user moves the blist.xml file out of the way), the existing code will never update the cached icon again.

-------------- next part --------------
============================================================
--- libpurple/buddyicon.c	d6392cd4c58357e01bfded407e7aa8f7ef101de6
+++ libpurple/buddyicon.c	7922224075ec8ab1def9b71134f02d107b4d6db6
@@ -121,13 +121,8 @@ purple_buddy_icon_data_cache(PurpleStore
 		}
 	}
 
-	if (!g_file_test(path, G_FILE_TEST_EXISTS)) {
-		purple_util_write_data_to_file_absolute(path, purple_imgstore_get_data(img),
-							purple_imgstore_get_size(img));	
-	} else 	{
-		purple_debug_error("buddyicon", "Unable to create file %s: %s\n",
-		                   path, "File already exists.");
-	}
+	purple_util_write_data_to_file_absolute(path, purple_imgstore_get_data(img),
+											purple_imgstore_get_size(img));	
 	g_free(path);
 }
 


More information about the Commits mailing list