diff options
author | Phil Mesnier <mesnierp@ociweb.com> | 2016-03-17 11:44:42 -0500 |
---|---|---|
committer | Phil Mesnier <mesnierp@ociweb.com> | 2016-03-17 11:45:22 -0500 |
commit | 4498f95388a4dc8574516e764af576a9450880d3 (patch) | |
tree | 42ebf9a5ada5101932465f75b70e16656f1505ee /TAO/utils | |
parent | 2ba4f318fb231e052889bdfdcb83b46f28f6b13d (diff) | |
download | ATCD-4498f95388a4dc8574516e764af576a9450880d3.tar.gz |
Clean up various Coverity and scoreboard issues
Diffstat (limited to 'TAO/utils')
-rw-r--r-- | TAO/utils/logWalker/Session.cpp | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/TAO/utils/logWalker/Session.cpp b/TAO/utils/logWalker/Session.cpp index 59a630a4dbf..a52574afb77 100644 --- a/TAO/utils/logWalker/Session.cpp +++ b/TAO/utils/logWalker/Session.cpp @@ -187,20 +187,31 @@ Session::stream_for ( ostream *oldstream, HostProcess *hp, const char *sub, cons if (oldstream == 0 && hp == 0) { - ACE_OS::mkdir(this->base_dir_.c_str()); + if (ACE_OS::mkdir(outname.c_str()) != 0 && errno != EEXIST) + ACE_ERROR ((LM_ERROR, + "Session::stream_for unable to make dir %C, %p\n", + outname.c_str(), "mkdir")); } delete oldstream; outname += ACE_DIRECTORY_SEPARATOR_CHAR; if (hp != 0) { outname += hp->proc_name(); - ACE_OS::mkdir(outname.c_str()); + if (ACE_OS::mkdir(outname.c_str()) != 0 && errno != EEXIST) + ACE_ERROR ((LM_ERROR, + "Session::stream_for unable to make dir %C, %p\n", + outname.c_str(), "mkdir")); + outname += ACE_DIRECTORY_SEPARATOR_CHAR; } outname += (sub == 0) ? "summary.txt" : sub; if (detail != 0) { - ACE_OS::mkdir(outname.c_str()); + if (ACE_OS::mkdir(outname.c_str()) != 0 && errno != EEXIST) + ACE_ERROR ((LM_ERROR, + "Session::stream_for unable to make dir %C, %p\n", + outname.c_str(), "mkdir")); + outname += ACE_DIRECTORY_SEPARATOR_CHAR; outname += detail; } |