mirror of
https://github.com/Icinga/icinga2.git
synced 2025-04-08 17:05:25 +02:00
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…
x
Reference in New Issue
Block a user