diff src/buddyicon.c @ 11303:10066662176a

[gaim-migrate @ 13503] For accounts, store only the basename of a buddy icon cache file. Everyone please make sure buddy icons still work for you. committer: Tailor Script <tailor@pidgin.im>
author Richard Laager <rlaager@wiktel.com>
date Thu, 18 Aug 2005 20:49:58 +0000
parents bb0d7b719af2
children 17142948653e
line wrap: on
line diff
--- a/src/buddyicon.c	Thu Aug 18 20:05:20 2005 +0000
+++ b/src/buddyicon.c	Thu Aug 18 20:49:58 2005 +0000
@@ -494,6 +494,18 @@
 	return cache_dir;
 }
 
+char *gaim_buddy_icons_get_full_path(const char *icon) {
+	struct stat st;
+
+	if (icon == NULL)
+		return NULL;
+
+	if (g_stat(icon, &st) == 0)
+		return g_strdup(icon);
+	else
+		return g_build_filename(gaim_buddy_icons_get_cache_dir(), icon, NULL);
+}
+
 void *
 gaim_buddy_icons_get_handle()
 {