From e27dee5476abc694f25eb42389cb3b015b2ec379 Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Sat, 21 May 2016 13:04:51 +0200 Subject: [PATCH] Windows: Fix missing path for repository handler fixes #11817 --- icinga-installer/icinga-installer.cpp | 2 +- lib/icinga/clusterevents.cpp | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/icinga-installer/icinga-installer.cpp b/icinga-installer/icinga-installer.cpp index c024315b5..3653b935a 100644 --- a/icinga-installer/icinga-installer.cpp +++ b/icinga-installer/icinga-installer.cpp @@ -272,7 +272,7 @@ static int InstallIcinga(void) MkDirP(dataDir + "/var/lib/icinga2/agent/inventory"); MkDirP(dataDir + "/var/lib/icinga2/api/config"); 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/log/icinga2/compat/archive"); MkDirP(dataDir + "/var/log/icinga2/crash"); diff --git a/lib/icinga/clusterevents.cpp b/lib/icinga/clusterevents.cpp index 34ff84042..114e38cae 100644 --- a/lib/icinga/clusterevents.cpp +++ b/lib/icinga/clusterevents.cpp @@ -721,6 +721,8 @@ Value ClusterEvents::UpdateRepositoryAPIHandler(const MessageOrigin::Ptr& origin if (vrepository.IsEmpty() || !vrepository.IsObjectType()) return Empty; + Utility::MkDirP(GetRepositoryDir(), 0755); + String repositoryFile = GetRepositoryDir() + SHA256(params->Get("endpoint")) + ".repo"; std::fstream fp;