diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-16 22:15:36 +0000 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2019-04-16 22:15:36 +0000 |
commit | b0a346689bd51255ed0a3fcf8083efbc33f68018 (patch) | |
tree | 4ca9b658cd576b1ac66fd93cf2e79d6437d25d33 /src/daemon/main.cpp | |
parent | Merge pull request #5430 (diff) | |
download | monero-b0a346689bd51255ed0a3fcf8083efbc33f68018.tar.xz |
daemon: fix absolute/relative log file test for windows
Diffstat (limited to 'src/daemon/main.cpp')
-rw-r--r-- | src/daemon/main.cpp | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/src/daemon/main.cpp b/src/daemon/main.cpp index 9e1c86b91..dbbb2308c 100644 --- a/src/daemon/main.cpp +++ b/src/daemon/main.cpp @@ -257,11 +257,7 @@ 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); -#ifdef __WIN32 - if (!strchr(log_file_path.c_str(), '/') && !strchr(log_file_path.c_str(), '\\')) -#else - if (!strchr(log_file_path.c_str(), '/')) -#endif + if (!log_file_path.has_parent_path()) 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)); |