diff --git a/lib/remote/configobjectutility.cpp b/lib/remote/configobjectutility.cpp index 38fda3824..b5026114a 100644 --- a/lib/remote/configobjectutility.cpp +++ b/lib/remote/configobjectutility.cpp @@ -110,6 +110,13 @@ bool ConfigObjectUtility::CreateObject(const Type::Ptr& type, const String& full } } + ConfigItem::Ptr item = ConfigItem::GetByTypeAndName(type, fullName); + + if (item) { + errors->Add("Object '" + fullName + "' already exists."); + return false; + } + String path = GetObjectConfigPath(type, fullName); Utility::MkDirP(Utility::DirName(path), 0700);