Move all filepath handling to files.c

This commit is contained in:
James Booth
2016-07-24 21:35:12 +01:00
parent 29452f8f1b
commit a3a73cf003
19 changed files with 174 additions and 262 deletions

View File

@@ -157,12 +157,10 @@ p_gpg_close(void)
void
p_gpg_on_connect(const char *const barejid)
{
gchar *data_home = files_get_xdg_data_home();
GString *pubsfile = g_string_new(data_home);
free(data_home);
char *pgpdir = files_get_data_path(DIR_PGP);
GString *pubsfile = g_string_new(pgpdir);
gchar *account_dir = str_replace(barejid, "@", "_at_");
g_string_append(pubsfile, "/profanity/pgp/");
g_string_append(pubsfile, "/");
g_string_append(pubsfile, account_dir);
free(account_dir);