Mercurial > pidgin.yaz
diff src/protocols/oscar/oscar.c @ 9801:7aa5a20519ee
[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 <tailor@pidgin.im>
author | Luke Schierer <lschiere@pidgin.im> |
---|---|
date | Sat, 21 Aug 2004 15:05:45 +0000 |
parents | 62eb9fe24692 |
children | 41b97d72e647 |
line wrap: on
line diff
--- 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;