From: <the...@us...> - 2006-11-28 09:18:20
|
Revision: 17839 http://svn.sourceforge.net/gaim/?rev=17839&view=rev Author: thekingant Date: 2006-11-28 01:18:20 -0800 (Tue, 28 Nov 2006) Log Message: ----------- I find this to be slightly cleaner Modified Paths: -------------- trunk/libgaim/account.c trunk/libgaim/buddyicon.c Modified: trunk/libgaim/account.c =================================================================== --- trunk/libgaim/account.c 2006-11-28 09:05:34 UTC (rev 17838) +++ trunk/libgaim/account.c 2006-11-28 09:18:20 UTC (rev 17839) @@ -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. */ Modified: trunk/libgaim/buddyicon.c =================================================================== --- trunk/libgaim/buddyicon.c 2006-11-28 09:05:34 UTC (rev 17838) +++ trunk/libgaim/buddyicon.c 2006-11-28 09:18:20 UTC (rev 17839) @@ -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); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |