[2/3] msi: Only extract a file when its disk id matches the media disk id.
Hans Leidekker
hans at codeweavers.com
Wed May 12 07:18:41 CDT 2010
This makes sure that an updated file is extracted from the cabinet stream
included in the patch, instead of the original source.
---
dlls/msi/files.c | 8 +++-----
1 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 10dbb28..bea1837 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -179,6 +179,7 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
LPWSTR *path, DWORD *attrs, PVOID user)
{
static MSIFILE *f = NULL;
+ MSIMEDIAINFO *mi = user;
if (action == MSICABEXTRACT_BEGINEXTRACT)
{
@@ -189,11 +190,8 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
return FALSE;
}
- if (f->state != msifs_missing && f->state != msifs_overwrite)
- {
- TRACE("Skipping extraction of %s\n", debugstr_w(file));
+ if (f->disk_id != mi->disk_id || (f->state != msifs_missing && f->state != msifs_overwrite))
return FALSE;
- }
msi_file_update_ui(package, f, szInstallFiles);
@@ -257,7 +255,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
data.mi = mi;
data.package = package;
data.cb = installfiles_cb;
- data.user = NULL;
+ data.user = mi;
if (file->IsCompressed &&
!msi_cabextract(package, mi, &data))
--
1.7.0.4
More information about the wine-patches
mailing list