aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--libempathy/empathy-contact.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/libempathy/empathy-contact.c b/libempathy/empathy-contact.c
index bbce927b7..44d9dbeed 100644
--- a/libempathy/empathy-contact.c
+++ b/libempathy/empathy-contact.c
@@ -858,27 +858,23 @@ contact_get_avatar_filename (EmpathyContact *contact,
gchar *avatar_path;
gchar *avatar_file;
gchar *token_escaped;
- gchar *contact_escaped;
if (EMP_STR_EMPTY (empathy_contact_get_id (contact)))
return NULL;
- contact_escaped = tp_escape_as_identifier (empathy_contact_get_id (contact));
token_escaped = tp_escape_as_identifier (token);
account = empathy_contact_get_account (contact);
- /* FIXME: Do not use the account, but proto/cm instead */
avatar_path = g_build_filename (g_get_user_cache_dir (),
- PACKAGE_NAME,
+ "telepathy",
"avatars",
- empathy_account_get_unique_name (account),
- contact_escaped,
+ empathy_account_get_connection_manager (account),
+ empathy_account_get_protocol (account),
NULL);
g_mkdir_with_parents (avatar_path, 0700);
avatar_file = g_build_filename (avatar_path, token_escaped, NULL);
- g_free (contact_escaped);
g_free (token_escaped);
g_free (avatar_path);