From 8de5326d23cb0cb015e552a20d9d26f842ac1eab Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Thu, 29 Nov 2018 17:51:53 +0100 Subject: [PATCH] Remove redundand check for object existence on creation via API refs #3937 --- lib/remote/configobjectutility.cpp | 5 ----- 1 file changed, 5 deletions(-) diff --git a/lib/remote/configobjectutility.cpp b/lib/remote/configobjectutility.cpp index 1fc8dcb92..708ec0303 100644 --- a/lib/remote/configobjectutility.cpp +++ b/lib/remote/configobjectutility.cpp @@ -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();