Windows: Fix missing path for repository handler

fixes #11817
This commit is contained in:
Michael Friedrich 2016-05-21 13:04:51 +02:00
parent 71e5fff6f6
commit e27dee5476
2 changed files with 3 additions and 1 deletions

View File

@ -272,7 +272,7 @@ static int InstallIcinga(void)
MkDirP(dataDir + "/var/lib/icinga2/agent/inventory"); MkDirP(dataDir + "/var/lib/icinga2/agent/inventory");
MkDirP(dataDir + "/var/lib/icinga2/api/config"); MkDirP(dataDir + "/var/lib/icinga2/api/config");
MkDirP(dataDir + "/var/lib/icinga2/api/log"); MkDirP(dataDir + "/var/lib/icinga2/api/log");
MkDirP(dataDir + "/var/lib/icinga2/api/zones"); MkDirP(dataDir + "/var/lib/icinga2/api/repository");
MkDirP(dataDir + "/var/lib/icinga2/api/zones"); MkDirP(dataDir + "/var/lib/icinga2/api/zones");
MkDirP(dataDir + "/var/log/icinga2/compat/archive"); MkDirP(dataDir + "/var/log/icinga2/compat/archive");
MkDirP(dataDir + "/var/log/icinga2/crash"); MkDirP(dataDir + "/var/log/icinga2/crash");

View File

@ -721,6 +721,8 @@ Value ClusterEvents::UpdateRepositoryAPIHandler(const MessageOrigin::Ptr& origin
if (vrepository.IsEmpty() || !vrepository.IsObjectType<Dictionary>()) if (vrepository.IsEmpty() || !vrepository.IsObjectType<Dictionary>())
return Empty; return Empty;
Utility::MkDirP(GetRepositoryDir(), 0755);
String repositoryFile = GetRepositoryDir() + SHA256(params->Get("endpoint")) + ".repo"; String repositoryFile = GetRepositoryDir() + SHA256(params->Get("endpoint")) + ".repo";
std::fstream fp; std::fstream fp;