From 5e5e9f56ffb672ed565b6802cc6c9922eb814bf7 Mon Sep 17 00:00:00 2001 From: sowle Date: Thu, 13 Aug 2020 15:23:39 +0300 Subject: [PATCH] simplewallet: fixed mysterious no-log-file issue --- contrib/epee/include/misc_log_ex.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/contrib/epee/include/misc_log_ex.h b/contrib/epee/include/misc_log_ex.h index 37b2400f..e0a58617 100644 --- a/contrib/epee/include/misc_log_ex.h +++ b/contrib/epee/include/misc_log_ex.h @@ -670,7 +670,9 @@ namespace log_space boost::filesystem::create_directories(m_default_log_path_w, ec); boost::filesystem::ofstream* pstream = new boost::filesystem::ofstream; - std::wstring target_path = m_default_log_path_w + L"/" + epee::string_encoding::utf8_to_wstring(pstream_name); + std::wstring target_path = epee::string_encoding::utf8_to_wstring(pstream_name); + if (!m_default_log_path_w.empty()) + target_path = m_default_log_path_w + L"/" + target_path; pstream->open( target_path.c_str(), std::ios_base::out | std::ios::app /*ios_base::trunc */); if(pstream->fail())