[empathy/mc5: 100/483] Escape the unique account name



commit 758bc33318e81709f4a64ea99c0629e9c522258a
Author: Sjoerd Simons <sjoerd simons collabora co uk>
Date:   Thu Jul 16 12:41:26 2009 +0100

    Escape the unique account name

 libempathy/empathy-log-store-empathy.c |    9 ++++++---
 1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 7e50cb1..abfb276 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -98,8 +98,8 @@ empathy_log_store_empathy_init (EmpathyLogStoreEmpathy *self)
 
   self->priv = priv;
 
-  priv->basedir = g_build_path (G_DIR_SEPARATOR_S, g_get_home_dir (),
-      ".gnome2", PACKAGE_NAME, "logs", NULL);
+  priv->basedir = g_build_path (G_DIR_SEPERATOR_S, g_get_user_data_dir (),
+    PACKAGE_NAME, "logs", NULL);
 
   priv->name = g_strdup ("Empathy");
   priv->account_manager = empathy_account_manager_dup_singleton ();
@@ -117,7 +117,8 @@ log_store_empathy_get_dir (EmpathyLogStore *self,
 
   priv = GET_PRIV (self);
 
-  account_id = empathy_account_get_unique_name (account);
+  account_id = tp_escape_as_identifier (
+    empathy_account_get_unique_name (account));
 
   if (chatroom)
     basedir = g_build_path (G_DIR_SEPARATOR_S, priv->basedir, account_id,
@@ -126,6 +127,8 @@ log_store_empathy_get_dir (EmpathyLogStore *self,
     basedir = g_build_path (G_DIR_SEPARATOR_S, priv->basedir,
         account_id, chat_id, NULL);
 
+  g_free (account_id);
+
   return basedir;
 }
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]