From e4fd6265ebc18a152b4c24f0bd7c8d44ad8ace16 Mon Sep 17 00:00:00 2001 From: Hans Leidekker Date: Fri, 10 Apr 2015 12:58:01 +0200 Subject: [PATCH] msi: Take the component action into account for file patches. --- dlls/msi/files.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index d1e3ecfdf54..31167540b57 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -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;