mirror of https://github.com/Icinga/icinga2.git
Ensure that api/log is created before attempting to write the current replay log
fixes #4977
This commit is contained in:
parent
e975c55fbd
commit
336deea02f
|
@ -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()) {
|
||||
|
|
Loading…
Reference in New Issue