aboutsummaryrefslogtreecommitdiffstats
path: root/libempathy
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-24 04:26:17 +0800
committerSjoerd Simons <sjoerd.simons@collabora.co.uk>2009-08-24 06:18:48 +0800
commita71220d4f3f8c5acec4e17b18573225dd0a5c125 (patch)
treea7af592b51d966afdd14e8aea20befc60a2b55b4 /libempathy
parent96ae3367ff3aca2ef4c33e7e1f4790c7d5cc6fe3 (diff)
downloadgsoc2013-empathy-a71220d4f3f8c5acec4e17b18573225dd0a5c125.tar
gsoc2013-empathy-a71220d4f3f8c5acec4e17b18573225dd0a5c125.tar.gz
gsoc2013-empathy-a71220d4f3f8c5acec4e17b18573225dd0a5c125.tar.bz2
gsoc2013-empathy-a71220d4f3f8c5acec4e17b18573225dd0a5c125.tar.lz
gsoc2013-empathy-a71220d4f3f8c5acec4e17b18573225dd0a5c125.tar.xz
gsoc2013-empathy-a71220d4f3f8c5acec4e17b18573225dd0a5c125.tar.zst
gsoc2013-empathy-a71220d4f3f8c5acec4e17b18573225dd0a5c125.zip
Make the dir names for the logs look nicer
Diffstat (limited to 'libempathy')
-rw-r--r--libempathy/empathy-log-store-empathy.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/libempathy/empathy-log-store-empathy.c b/libempathy/empathy-log-store-empathy.c
index 81cbcade7..fe1afd9b0 100644
--- a/libempathy/empathy-log-store-empathy.c
+++ b/libempathy/empathy-log-store-empathy.c
@@ -37,6 +37,7 @@
#define G_DISABLE_DEPRECATED
#include <telepathy-glib/util.h>
+#include <telepathy-glib/defs.h>
#include "empathy-log-store.h"
#include "empathy-log-store-empathy.h"
@@ -122,15 +123,16 @@ log_store_empathy_get_dir (EmpathyLogStore *self,
{
gchar *basedir;
gchar *escaped;
+ const gchar *name;
EmpathyLogStoreEmpathyPriv *priv;
priv = GET_PRIV (self);
- /* unique name is an object path, ignore the initial / and replace the others
- * by % */
- escaped = g_strdup (empathy_account_get_unique_name (account) + 1);
+ 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);
- g_strdelimit (escaped, "/", '%');
+ escaped = g_strdelimit (g_strdup (name), "/", '_');
if (chatroom)
basedir = g_build_path (G_DIR_SEPARATOR_S, priv->basedir, escaped,