Remove redundand check for object existence on creation via API

refs #3937
This commit is contained in:
Alexander A. Klimov 2018-11-29 17:51:53 +01:00 committed by Michael Friedrich
parent 190f381c7a
commit c8a1155e3d
1 changed files with 0 additions and 5 deletions

View File

@ -120,11 +120,6 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full
String path = GetObjectConfigPath(type, fullName);
Utility::MkDirP(Utility::DirName(path), 0700);
if (Utility::PathExists(path)) {
errors->Add("Cannot create object '" + fullName + "'. Configuration file '" + path + "' already exists.");
return false;
}
std::ofstream fp(path.CStr(), std::ofstream::out | std::ostream::trunc);
fp << config;
fp.close();