1
0
Fork 0
forked from lthn/blockchain

simplewallet: fixed mysterious no-log-file issue

This commit is contained in:
sowle 2020-08-13 15:23:39 +03:00
parent adc1efbbd9
commit 5e5e9f56ff
No known key found for this signature in database
GPG key ID: C07A24B2D89D49FC

View file

@ -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())