1
0
mirror of https://github.com/irssi/irssi.git synced 2024-12-04 14:46:39 -05:00

Time formats didn't work in directory name of autologs.

git-svn-id: http://svn.irssi.org/repos/irssi/trunk@866 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
Timo Sirainen 2000-11-25 16:30:56 +00:00 committed by cras
parent d1d70fd5d7
commit 45c9838141
2 changed files with 6 additions and 8 deletions

View File

@ -348,6 +348,7 @@ LOG_REC *log_create_rec(const char *fname, int level)
if (rec == NULL) {
rec = g_new0(LOG_REC, 1);
rec->fname = g_strdup(fname);
rec->real_fname = log_filename(rec);
rec->handle = -1;
}

View File

@ -342,7 +342,7 @@ static void autologs_close_all(void)
static void autolog_open(void *server, const char *target)
{
LOG_REC *log;
char *fname, *dir, *str;
char *fname, *dir;
log = logs_find_item(LOG_ITEM_TARGET, target, server, NULL);
if (log != NULL && !log->failed) {
@ -352,16 +352,13 @@ static void autolog_open(void *server, const char *target)
fname = parse_special_string(autolog_path, server, NULL, target, NULL);
if (log_find(fname) == NULL) {
str = convert_home(fname);
dir = g_dirname(str);
g_free(str);
mkpath(dir, LOG_DIR_CREATE_MODE);
g_free(dir);
log = log_create_rec(fname, autolog_level);
log_item_add(log, LOG_ITEM_TARGET, target, server);
dir = g_dirname(log->real_fname);
mkpath(dir, LOG_DIR_CREATE_MODE);
g_free(dir);
log->temp = TRUE;
log_update(log);
log_start_logging(log);