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

fix issue where log file cannot be created due to invalid name/path

This commit is contained in:
Jfreegman
2014-04-12 03:39:15 -04:00
parent a29136d6b7
commit 5b3acf3f6b
2 changed files with 6 additions and 0 deletions

View File

@ -42,6 +42,9 @@ void init_logging_session(uint8_t *name, uint8_t *key, struct chatlog *log)
if (!log->log_on)
return;
if (!valid_nick(name))
name = UNKNOWN_NAME;
char *user_config_dir = get_user_config_dir();
int path_len = strlen(user_config_dir) + strlen(CONFIGDIR) + strlen(name);