# HG changeset patch # User Luke Schierer # Date 1093100745 0 # Node ID 7aa5a20519eee190a5fb074dcc0266b50af57426 # Parent cc68a8c6e741700670e76ca58113a92b17a497f8 [gaim-migrate @ 10669] On Fri, 2004-08-20 at 23:57, Tim Ringenbach wrote: > > relative buddy icon paths instead of absolute ones from nosnilmot. this > > should save some headaches migrating a ~/.gaim around > I think you broke something here. On start up I notice all buddy icons > are fetched again, and they only show up in my buddy list, never my > conversation window. I did break something. I think the logic of "if the old file doesn't exist, then delete the new one instead" when removing old icons isn't exactly what I meant to do. You were also correct to point out that prpls might use them directly - oscar does. Patch attached to fix both cases. Regards, Stu. committer: Tailor Script diff -r cc68a8c6e741 -r 7aa5a20519ee src/buddyicon.c --- a/src/buddyicon.c Sat Aug 21 05:12:23 2004 +0000 +++ b/src/buddyicon.c Sat Aug 21 15:05:45 2004 +0000 @@ -246,7 +246,7 @@ if(!stat(old_icon, &st)) unlink(old_icon); else { - filename = g_build_filename(dirname, random, NULL); + filename = g_build_filename(dirname, old_icon, NULL); if(!stat(filename, &st)) unlink(filename); g_free(filename); diff -r cc68a8c6e741 -r 7aa5a20519ee src/protocols/oscar/oscar.c --- a/src/protocols/oscar/oscar.c Sat Aug 21 05:12:23 2004 +0000 +++ b/src/protocols/oscar/oscar.c Sat Aug 21 15:05:45 2004 +0000 @@ -2763,7 +2763,7 @@ /* Server stored icon stuff */ if (info->iconcsumlen) { const char *filename = NULL, *saved_b16 = NULL; - char *b16 = NULL; + char *b16 = NULL, *filepath = NULL; GaimBuddy *b = NULL; b16 = gaim_base16_encode(info->iconcsum, info->iconcsumlen); @@ -2777,6 +2777,14 @@ if (g_file_test(filename, G_FILE_TEST_EXISTS)) saved_b16 = gaim_blist_node_get_string((GaimBlistNode*)b, "icon_checksum"); + else { + filepath = g_build_filename(gaim_buddy_icons_get_cache_dir(), + filename, NULL); + if (g_file_test(filepath, G_FILE_TEST_EXISTS)) + saved_b16 = gaim_blist_node_get_string((GaimBlistNode*)b, + "icon_checksum"); + g_free(filepath); + } } else saved_b16 = NULL;