From: Gunnar Beutner Date: Tue, 26 Jan 2016 09:45:03 +0000 (+0100) Subject: Use MkDirP instead of MkDir when syncing zone configs X-Git-Tag: v2.5.0~590 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1eecc72093ef19dabc6bd078f8b4ffa823966006;p=icinga2 Use MkDirP instead of MkDir when syncing zone configs fixes #10932 --- 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);