1
0
mirror of https://github.com/Tha14/toxic.git synced 2025-06-20 13:06:36 +02:00

put chatlogs in their own directory

This commit is contained in:
Jfreegman
2014-08-02 21:01:40 -04:00
parent 3cbe61e111
commit c14f2a3fcd
4 changed files with 29 additions and 13 deletions

View File

@ -43,7 +43,7 @@ void init_logging_session(char *name, const char *key, struct chatlog *log)
name = UNKNOWN_NAME;
char *user_config_dir = get_user_config_dir();
int path_len = strlen(user_config_dir) + strlen(CONFIGDIR) + strlen(name);
int path_len = strlen(user_config_dir) + strlen(LOGDIR) + strlen(name);
/* use first 4 digits of key as log ident. If no key use a timestamp */
char ident[32];
@ -66,7 +66,7 @@ void init_logging_session(char *name, const char *key, struct chatlog *log)
}
char log_path[MAX_STR_SIZE];
snprintf(log_path, MAX_STR_SIZE, "%s%s%s-%s.log", user_config_dir, CONFIGDIR, name, ident);
snprintf(log_path, MAX_STR_SIZE, "%s%s%s-%s.log", user_config_dir, LOGDIR, name, ident);
free(user_config_dir);