bool ResTypePkgFilterChecker::CheckFilter(pkgmgrinfo_node_x* node,
package_x* info) {
- return (info->removable == nullptr || info->removable[0] == '\0' ||
- strcasecmp(node->value, info->removable) == 0);
+ if (!info->res_type)
+ return false;
+
+ if (node->value == nullptr || strlen(node->value) == 0)
+ return info->res_type != nullptr;
+
+ return strcmp(node->value, info->res_type) == 0;
}
} // namespace database