msi: Take the component action into account for file patches.

This commit is contained in:
Hans Leidekker 2015-04-10 12:58:01 +02:00 committed by Alexandre Julliard
parent 17b80c8ec0
commit e4fd6265eb
1 changed files with 11 additions and 0 deletions

View File

@ -455,8 +455,19 @@ static BOOL patchfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
if (action == MSICABEXTRACT_BEGINEXTRACT)
{
MSICOMPONENT *comp;
if (!(patch = find_filepatch( package, patch->disk_id, file ))) return FALSE;
comp = patch->File->Component;
comp->Action = msi_get_component_action( package, comp );
if (!comp->Enabled || comp->Action != INSTALLSTATE_LOCAL)
{
TRACE("file %s component %s not installed or disabled\n",
debugstr_w(patch->File->File), debugstr_w(comp->Component));
return FALSE;
}
patch->path = msi_create_temp_file( package->db );
*path = strdupW( patch->path );
*attrs = patch->File->Attributes;