ConfigObjectUtility::DeleteObjectHelper(): only delete _api files

to restore the behavior before the previous commit. Otherwise we'd delete all
API object's child objects' files including applied child object rules in /etc.
This commit is contained in:
Alexander A. Klimov 2023-01-05 18:05:31 +01:00
parent 145ee890df
commit e1bb085b0f
1 changed files with 3 additions and 1 deletions

View File

@ -353,7 +353,9 @@ bool ConfigObjectUtility::DeleteObjectHelper(const ConfigObject::Ptr& object, bo
return false;
}
Utility::Remove(GetExistingObjectConfigPath(object));
if (object->GetPackage() == "_api") {
Utility::Remove(GetExistingObjectConfigPath(object));
}
Log(LogInformation, "ConfigObjectUtility")
<< "Deleted object '" << name << "' of type '" << type->GetName() << "'.";