From 1eecc72093ef19dabc6bd078f8b4ffa823966006 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 7da0763b1..bc1d11102 100644 --- a/lib/remote/apilistener-filesync.cpp +++ b/lib/remote/apilistener-filesync.cpp @@ -143,7 +143,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); @@ -244,7 +244,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