msi: Assume a transform is applicable if it doesn't specify any products.

This commit is contained in:
Hans Leidekker 2013-05-03 14:46:32 +02:00 committed by Alexandre Julliard
parent 7f81a2c6b1
commit 8328562e4c

View file

@ -44,22 +44,22 @@ static BOOL match_language( MSIPACKAGE *package, LANGID langid )
return FALSE;
}
static UINT check_transform_applicable( MSIPACKAGE *package, IStorage *patch )
static UINT check_transform_applicable( MSIPACKAGE *package, IStorage *transform )
{
LPWSTR prod_code, patch_product, template = NULL;
WCHAR *package_product, *transform_product, *template = NULL;
UINT ret = ERROR_FUNCTION_FAILED;
prod_code = msi_dup_property( package->db, szProductCode );
patch_product = msi_get_suminfo_product( patch );
package_product = msi_dup_property( package->db, szProductCode );
transform_product = msi_get_suminfo_product( transform );
TRACE("db = %s patch = %s\n", debugstr_w(prod_code), debugstr_w(patch_product));
TRACE("package = %s transform = %s\n", debugstr_w(package_product), debugstr_w(transform_product));
if (strstrW( patch_product, prod_code ))
if (!transform_product || strstrW( transform_product, package_product ))
{
MSISUMMARYINFO *si;
const WCHAR *p;
si = MSI_GetSummaryInformationW( patch, 0 );
si = MSI_GetSummaryInformationW( transform, 0 );
if (!si)
{
ERR("no summary information!\n");
@ -90,8 +90,8 @@ static UINT check_transform_applicable( MSIPACKAGE *package, IStorage *patch )
}
end:
msi_free( patch_product );
msi_free( prod_code );
msi_free( transform_product );
msi_free( package_product );
msi_free( template );
return ret;
}