diff options
author | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:42:26 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2019-04-16 22:42:26 +0200 |
commit | b0472c43a16510e8d450dc550f821faa0bd5e739 (patch) | |
tree | 211cfd8b35f3f42b83584f3ad619f6aee231ae3b /src | |
parent | Merge pull request #5434 (diff) | |
parent | daemon: if a log file has a /, interpret it from the cwd (diff) | |
download | monero-b0472c43a16510e8d450dc550f821faa0bd5e739.tar.xz |
Merge pull request #5435
5140c15e daemon: if a log file has a /, interpret it from the cwd (moneromooo-monero)
Diffstat (limited to 'src')
-rw-r--r-- | src/daemon/main.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index c3ac24b70..9e1c86b91 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -257,7 +257,12 @@ int main(int argc, char const * argv[]) bf::path log_file_path {data_dir / std::string(CRYPTONOTE_NAME ".log")}; if (!command_line::is_arg_defaulted(vm, daemon_args::arg_log_file)) log_file_path = command_line::get_arg(vm, daemon_args::arg_log_file); - log_file_path = bf::absolute(log_file_path, relative_path_base); +#ifdef __WIN32 + if (!strchr(log_file_path.c_str(), '/') && !strchr(log_file_path.c_str(), '\\')) +#else + if (!strchr(log_file_path.c_str(), '/')) +#endif + log_file_path = bf::absolute(log_file_path, relative_path_base); mlog_configure(log_file_path.string(), true, command_line::get_arg(vm, daemon_args::arg_max_log_file_size), command_line::get_arg(vm, daemon_args::arg_max_log_files)); // Set log level |