about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorMichael Vetter <jubalh@iodoru.org>2022-04-01 14:39:10 +0200
committerGitHub <noreply@github.com>2022-04-01 14:39:10 +0200
commitaf6a9df79b348ce47a288dee259eb0a83399b9ea (patch)
tree3ed05f31f21a5c0e0d0204300202b0bbfadb8938
parentba3d5e8de926a6a35177e71ed190e5db356cc666 (diff)
parentd82f2f293b056965fc0bed2b24820961885ab90b (diff)
downloadprofani-tty-af6a9df79b348ce47a288dee259eb0a83399b9ea.tar.gz
Merge pull request #1672 from profanity-im/fix-logging
fix path where logs are stored
-rw-r--r--src/log.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/log.c b/src/log.c
index 546f7804..428e1a10 100644
--- a/src/log.c
+++ b/src/log.c
@@ -679,8 +679,10 @@ _get_log_filename(const char* const other, const char* const login, GDateTime* d
 {
     gchar* chatlogs_dir = files_file_in_account_data_path(DIR_CHATLOGS, login, is_room ? "rooms" : NULL);
     gchar* logfile_name = g_date_time_format(dt, "%Y_%m_%d.log");
-    gchar* logfile_path = files_file_in_account_data_path(chatlogs_dir, other, logfile_name);
+    gchar* other_ = str_replace(other, "@", "_at_");
+    gchar* logfile_path = g_strdup_printf("%s/%s/%s", chatlogs_dir, other_, logfile_name);
 
+    g_free(other_);
     g_free(logfile_name);
     g_free(chatlogs_dir);
 
n136'>136 137 138 139 140 141 142