From 336deea02f674c6efcac03f7b9321bbce066b956 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 8 Feb 2017 13:06:31 +0100 Subject: [PATCH] Ensure that api/log is created before attempting to write the current replay log fixes #4977 --- lib/remote/apilistener.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 4aab31f0a..e9345f4d4 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -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()) {