diff options
author | warptangent <warptangent@inbox.com> | 2015-08-16 18:14:49 -0700 |
---|---|---|
committer | warptangent <warptangent@inbox.com> | 2015-08-16 18:45:45 -0700 |
commit | b5b0f0857a281d90702e2db0a7c3a855f90c7a21 (patch) | |
tree | ff77a97ac86d145c922d0d4bc3106cfcf93a917e /contrib | |
parent | Merge pull request #376 (diff) | |
download | monero-b5b0f0857a281d90702e2db0a7c3a855f90c7a21.tar.xz |
epee: Don't set log file name when process path name isn't found
If process path name isn't found, then leave log file name blank.
This also applies if a process name is found, but it's blank after
removing a trailing dot extension.
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/epee/include/misc_log_ex.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/epee/include/misc_log_ex.h b/contrib/epee/include/misc_log_ex.h index 42adc7c43..2adac7f2f 100644 --- a/contrib/epee/include/misc_log_ex.h +++ b/contrib/epee/include/misc_log_ex.h @@ -861,7 +861,8 @@ namespace log_space std::string::size_type a = m_default_log_file.rfind('.'); if ( a != std::string::npos ) m_default_log_file.erase( a, m_default_log_file.size()); - m_default_log_file += ".log"; + if ( ! m_default_log_file.empty() ) + m_default_log_file += ".log"; return true; } |