mirror of
https://github.com/Icinga/icinga2.git
synced 2025-07-28 16:14:09 +02:00
parent
e456cfd99c
commit
67e50a3d47
@ -43,7 +43,7 @@ void ApiListener::ConfigGlobHandler(Dictionary::Ptr& config, const String& path,
|
|||||||
Log(LogNotice, "ApiListener")
|
Log(LogNotice, "ApiListener")
|
||||||
<< "Creating config update for file '" << file << "'";
|
<< "Creating config update for file '" << file << "'";
|
||||||
|
|
||||||
std::ifstream fp(file.CStr());
|
std::ifstream fp(file.CStr(), std::ifstream::binary);
|
||||||
if (!fp)
|
if (!fp)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ bool ApiListener::UpdateConfigDir(const Dictionary::Ptr& oldConfig, const Dictio
|
|||||||
|
|
||||||
//pass the directory and generate a dir tree, if not existing already
|
//pass the directory and generate a dir tree, if not existing already
|
||||||
Utility::MkDirP(Utility::DirName(path), 0755);
|
Utility::MkDirP(Utility::DirName(path), 0755);
|
||||||
std::ofstream fp(path.CStr(), std::ofstream::out | std::ostream::trunc);
|
std::ofstream fp(path.CStr(), std::ofstream::out | std::ostream::binary | std::ostream::trunc);
|
||||||
fp << kv.second;
|
fp << kv.second;
|
||||||
fp.close();
|
fp.close();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user