From b5b0f0857a281d90702e2db0a7c3a855f90c7a21 Mon Sep 17 00:00:00 2001 From: warptangent Date: Sun, 16 Aug 2015 18:14:49 -0700 Subject: 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. --- contrib/epee/include/misc_log_ex.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'contrib/epee/include/misc_log_ex.h') 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; } -- cgit v1.2.3