Commit 8328562e authored by Hans Leidekker's avatar Hans Leidekker Committed by Alexandre Julliard

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

parent 7f81a2c6
...@@ -44,22 +44,22 @@ static BOOL match_language( MSIPACKAGE *package, LANGID langid ) ...@@ -44,22 +44,22 @@ static BOOL match_language( MSIPACKAGE *package, LANGID langid )
return FALSE; 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; UINT ret = ERROR_FUNCTION_FAILED;
prod_code = msi_dup_property( package->db, szProductCode ); package_product = msi_dup_property( package->db, szProductCode );
patch_product = msi_get_suminfo_product( patch ); 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; MSISUMMARYINFO *si;
const WCHAR *p; const WCHAR *p;
si = MSI_GetSummaryInformationW( patch, 0 ); si = MSI_GetSummaryInformationW( transform, 0 );
if (!si) if (!si)
{ {
ERR("no summary information!\n"); ERR("no summary information!\n");
...@@ -90,8 +90,8 @@ static UINT check_transform_applicable( MSIPACKAGE *package, IStorage *patch ) ...@@ -90,8 +90,8 @@ static UINT check_transform_applicable( MSIPACKAGE *package, IStorage *patch )
} }
end: end:
msi_free( patch_product ); msi_free( transform_product );
msi_free( prod_code ); msi_free( package_product );
msi_free( template ); msi_free( template );
return ret; return ret;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment