From 1831ae5041d288115fa93da0f50f76667eadf2f9 Mon Sep 17 00:00:00 2001 From: isanae <14251494+isanae@users.noreply.github.com> Date: Mon, 9 Nov 2020 03:27:10 -0500 Subject: [PATCH] log file relative to prefix --- src/conf.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/conf.cpp b/src/conf.cpp index 7a0c32c..f2f56b8 100644 --- a/src/conf.cpp +++ b/src/conf.cpp @@ -1099,7 +1099,7 @@ void init_options( { const auto po = parse_option(o); - if (po.section == "paths" && po.key == "prefix") + if (po.section == "paths" && po.key == "prefix") { ini_prefix = ""; } @@ -1133,7 +1133,12 @@ void init_options( } set_special_options(); - context::set_log_file(conf::log_file()); + + auto log_file = conf::log_file(); + if (log_file.is_relative()) + log_file = paths::prefix() / log_file; + + context::set_log_file(log_file); gcx().debug(context::conf, "command line: {}", std::wstring(GetCommandLineW()));