diff options
author | Matthias Jentsch <mtthsjntsch@gmail.com> | 2015-10-20 13:38:40 +0300 |
---|---|---|
committer | Matthias Jentsch <mtthsjntsch@gmail.com> | 2015-10-20 13:38:40 +0300 |
commit | ee9626e6daf2a47b7fd0a191ff585fedc044371e (patch) | |
tree | 917eff6991bb276e47b9e341aaaaf7ca9d442ff7 /telegram-base.c | |
parent | 728da04d3cd6edf459138e05cf830f8eb084dc6f (diff) | |
parent | 56445b482181fdb25b938feda6cb6f3862aa1912 (diff) |
Merge remote-tracking branch 'wiederhake/beta4' into beta4
Diffstat (limited to 'telegram-base.c')
-rw-r--r-- | telegram-base.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/telegram-base.c b/telegram-base.c index 9e231ea..50a721f 100644 --- a/telegram-base.c +++ b/telegram-base.c @@ -437,7 +437,7 @@ void read_secret_chat_file (struct tgl_state *TLS) { close (secret_chat_fd); } -gchar *get_config_dir (struct tgl_state *TLS, char const *username) { +gchar *get_config_dir (char const *username) { gchar *dir = g_strconcat (purple_user_dir(), G_DIR_SEPARATOR_S, config_dir, G_DIR_SEPARATOR_S, username, NULL); @@ -452,6 +452,18 @@ gchar *get_config_dir (struct tgl_state *TLS, char const *username) { return dir; } +gchar *get_user_pk_path () { + /* This can't be conditional on whether or not we're using telepathy, because + * then we would need to make sure that `make local_install` also knows about + * that location. So we *always* use ${HOME}/.purple/telegram-purple, + * even when the other files aren't in this folder. + * Note that this is only visible when using Telepathy/Empathy with + * local_install, which should be kinda rare anyway (use telepathy-morse!). */ + return g_strconcat (g_get_home_dir(), G_DIR_SEPARATOR_S, ".purple", + G_DIR_SEPARATOR_S, "telegram-purple", + G_DIR_SEPARATOR_S, user_pk_filename, NULL); +} + gchar *get_download_dir (struct tgl_state *TLS) { assert (TLS->base_path); static gchar *dir; |