Ensure that api/log is created before attempting to write the current replay log

fixes #4977
This commit is contained in:
Michael Friedrich 2017-02-08 13:06:31 +01:00
parent e975c55fbd
commit 336deea02f
1 changed files with 2 additions and 0 deletions

View File

@ -846,6 +846,8 @@ void ApiListener::OpenLogFile(void)
{
String path = GetApiDir() + "log/current";
Utility::MkDirP(Utility::DirName(path), 0750);
std::fstream *fp = new std::fstream(path.CStr(), std::fstream::out | std::ofstream::app);
if (!fp->good()) {