From 5c23beb6a9ddc78f968b63545a5945b02b77351e Mon Sep 17 00:00:00 2001 From: Gunnar Beutner Date: Tue, 26 Jan 2016 10:45:03 +0100 Subject: [PATCH] Use MkDirP instead of MkDir when syncing zone configs fixes #10932 --- lib/remote/apilistener-filesync.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/remote/apilistener-filesync.cpp b/lib/remote/apilistener-filesync.cpp index 492d6ca5a..00927e9dc 100644 --- a/lib/remote/apilistener-filesync.cpp +++ b/lib/remote/apilistener-filesync.cpp @@ -134,7 +134,7 @@ void ApiListener::SyncZoneDir(const Zone::Ptr& zone) const Log(LogInformation, "ApiListener") << "Copying " << newConfig->GetLength() << " zone configuration files for zone '" << zone->GetName() << "' to '" << oldDir << "'."; - Utility::MkDir(oldDir, 0700); + Utility::MkDirP(oldDir, 0700); Dictionary::Ptr oldConfig = LoadConfigDir(oldDir); @@ -240,7 +240,7 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const D String oldDir = Application::GetLocalStateDir() + "/lib/icinga2/api/zones/" + zone->GetName(); - Utility::MkDir(oldDir, 0700); + Utility::MkDirP(oldDir, 0700); Dictionary::Ptr newConfig = kv.second; Dictionary::Ptr oldConfig = LoadConfigDir(oldDir); -- 2.40.0