Hans Leidekker : msi: Only extract a file when its disk id matches the media disk id.

Alexandre Julliard julliard at winehq.org
Wed May 12 12:33:21 CDT 2010


Module: wine
Branch: master
Commit: 6475c11c1f5ef0eaee9f9476ed3ff7686d58056d
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=6475c11c1f5ef0eaee9f9476ed3ff7686d58056d

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed May 12 14:18:41 2010 +0200

msi: Only extract a file when its disk id matches the media disk id.

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))




More information about the wine-cvs mailing list