aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-24 07:21:27 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-24 07:21:27 +0800
commitaa0487edef4dc671e99a9e4dc6a1895c0fdaca4a (patch)
tree194e39f0649d8c28227f953f6dfab1435493c95c /libempathy
parent7894d6060831bbb8134386cb24e1cf741a146ace (diff)
downloadgsoc2013-empathy-aa0487edef4dc671e99a9e4dc6a1895c0fdaca4a.tar
gsoc2013-empathy-aa0487edef4dc671e99a9e4dc6a1895c0fdaca4a.tar.gz
gsoc2013-empathy-aa0487edef4dc671e99a9e4dc6a1895c0fdaca4a.tar.bz2
gsoc2013-empathy-aa0487edef4dc671e99a9e4dc6a1895c0fdaca4a.tar.lz
gsoc2013-empathy-aa0487edef4dc671e99a9e4dc6a1895c0fdaca4a.tar.xz
gsoc2013-empathy-aa0487edef4dc671e99a9e4dc6a1895c0fdaca4a.tar.zst
gsoc2013-empathy-aa0487edef4dc671e99a9e4dc6a1895c0fdaca4a.zip
Split out the account name to dirname translation
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-log-store-empathy.c20
1 files changed, 14 insertions, 6 deletions
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index fe1afd9b0..723ee6434 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -116,6 +116,19 @@ empathy_log_store_empathy_init (EmpathyLogStoreEmpathy *self)
}
static gchar *
+log_store_account_to_dirname (EmpathyAccount *account)
+{
+ const gchar *name;
+
+ name = empathy_account_get_unique_name (account);
+ if (g_str_has_prefix (name, TP_ACCOUNT_OBJECT_PATH_BASE))
+ name += strlen (TP_ACCOUNT_OBJECT_PATH_BASE);
+
+ return g_strdelimit (g_strdup (name), "/", '_');
+}
+
+
+static gchar *
log_store_empathy_get_dir (EmpathyLogStore *self,
EmpathyAccount *account,
const gchar *chat_id,
@@ -123,16 +136,11 @@ log_store_empathy_get_dir (EmpathyLogStore *self,
{
gchar *basedir;
gchar *escaped;
- const gchar *name;
EmpathyLogStoreEmpathyPriv *priv;
priv = GET_PRIV (self);
- name = empathy_account_get_unique_name (account);
- if (g_str_has_prefix (name, TP_ACCOUNT_OBJECT_PATH_BASE))
- name += strlen (TP_ACCOUNT_OBJECT_PATH_BASE);
-
- escaped = g_strdelimit (g_strdup (name), "/", '_');
+ escaped = log_store_account_to_dirname (account);
if (chatroom)
basedir = g_build_path (G_DIR_SEPARATOR_S, priv->basedir, escaped,