From 5e75b7048a21ce024570026c5c91f77fb4a7e26e Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Fri, 9 Jan 2009 14:03:44 -0500 Subject: [PATCH] deliver: If log path begins with ~/, expand it to $HOME directory. This doesn't really work if using -d parameter, since the expansion is done before the userdb lookup. --HG-- branch : HEAD --- src/deliver/deliver.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/deliver/deliver.c b/src/deliver/deliver.c index d96417945b..7f2fddda93 100644 --- a/src/deliver/deliver.c +++ b/src/deliver/deliver.c @@ -688,7 +688,7 @@ static void open_logfile(const char *username) const char *prefix, *log_path, *stamp; prefix = t_strdup_printf("deliver(%s): ", username); - log_path = getenv("LOG_PATH"); + log_path = home_expand(getenv("LOG_PATH")); if (log_path == NULL || *log_path == '\0') { const char *env = getenv("SYSLOG_FACILITY"); int facility; @@ -702,7 +702,7 @@ static void open_logfile(const char *username) i_set_failure_file(log_path, prefix); } - log_path = getenv("INFO_LOG_PATH"); + log_path = home_expand(getenv("INFO_LOG_PATH")); if (log_path != NULL && *log_path != '\0') i_set_info_file(log_path); -- 2.47.3