summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTimo Sirainen <cras@irssi.org>2000-11-25 16:30:56 +0000
committercras <cras@dbcabf3a-b0e7-0310-adc4-f8d773084564>2000-11-25 16:30:56 +0000
commit45c9838141a9ef15d718d07a908d97d90dd5aa15 (patch)
tree994587db8a22433124454fa1528b3253047707aa /src
parentd1d70fd5d78af01040983831cbe9aa79f1d56425 (diff)
downloadirssi-45c9838141a9ef15d718d07a908d97d90dd5aa15.zip
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
Diffstat (limited to 'src')
-rw-r--r--src/core/log.c1
-rw-r--r--src/fe-common/core/fe-log.c11
2 files changed, 5 insertions, 7 deletions
diff --git a/src/core/log.c b/src/core/log.c
index 9617b0c5..112e46b6 100644
--- a/src/core/log.c
+++ b/src/core/log.c
@@ -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;
}
diff --git a/src/fe-common/core/fe-log.c b/src/fe-common/core/fe-log.c
index 95ab07e4..8250dd90 100644
--- a/src/fe-common/core/fe-log.c
+++ b/src/fe-common/core/fe-log.c
@@ -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);
+ 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 = log_create_rec(fname, autolog_level);
- log_item_add(log, LOG_ITEM_TARGET, target, server);
-
log->temp = TRUE;
log_update(log);
log_start_logging(log);