Mercurial > pidgin
changeset 15055:577ddea3ab82
[gaim-migrate @ 17839]
I find this to be slightly cleaner
committer: Tailor Script <tailor@pidgin.im>
author | Mark Doliner <mark@kingant.net> |
---|---|
date | Tue, 28 Nov 2006 09:18:20 +0000 |
parents | f58283ce58ea |
children | e8ba9f4a3a7d |
files | libgaim/account.c libgaim/buddyicon.c |
diffstat | 2 files changed, 3 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/libgaim/account.c Tue Nov 28 09:05:34 2006 +0000 +++ b/libgaim/account.c Tue Nov 28 09:18:20 2006 +0000 @@ -1232,9 +1232,8 @@ if (account->buddy_icon != NULL && (icon == NULL || strcmp(account->buddy_icon, icon))) { const char *dirname = gaim_buddy_icons_get_cache_dir(); - struct stat st; - - if (g_stat(account->buddy_icon, &st) == 0) + + if (g_file_test(account->buddy_icon, G_FILE_TEST_IS_REGULAR)) { /* The file exists. This is a full path. */
--- a/libgaim/buddyicon.c Tue Nov 28 09:05:34 2006 +0000 +++ b/libgaim/buddyicon.c Tue Nov 28 09:18:20 2006 +0000 @@ -492,12 +492,10 @@ } char *gaim_buddy_icons_get_full_path(const char *icon) { - struct stat st; - if (icon == NULL) return NULL; - if (g_stat(icon, &st) == 0) + if (g_file_test(icon, G_FILE_TEST_IS_REGULAR)) return g_strdup(icon); else return g_build_filename(gaim_buddy_icons_get_cache_dir(), icon, NULL);