ResTypePkgFilterChecker filters the cached package information
to the resource type
Fix the the filter's behavior
Change-Id: Ia244ff932365be41b2fdb47c477644292058c85f
Signed-off-by: ilho kim <ilho159.kim@samsung.com>
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