Hans Leidekker : msi: Restrict the match on files from cabinets to the disk ID.

Alexandre Julliard julliard at winehq.org
Thu Jun 20 15:31:16 CDT 2013


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Thu Jun 20 10:32:11 2013 +0200

msi: Restrict the match on files from cabinets to the disk ID.

---

 dlls/msi/files.c |   10 ++++++----
 1 files changed, 6 insertions(+), 4 deletions(-)

diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index d53da91..ec46ae3 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -246,13 +246,15 @@ static UINT msi_create_directory( MSIPACKAGE *package, const WCHAR *dir )
     return ERROR_SUCCESS;
 }
 
-static MSIFILE *find_file( MSIPACKAGE *package, const WCHAR *filename )
+static MSIFILE *find_file( MSIPACKAGE *package, UINT disk_id, const WCHAR *filename )
 {
     MSIFILE *file;
 
     LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
     {
-        if (file->state != msifs_installed && !strcmpiW( filename, file->File )) return file;
+        if (file->disk_id == disk_id &&
+            file->state != msifs_installed &&
+            !strcmpiW( filename, file->File )) return file;
     }
     return NULL;
 }
@@ -265,7 +267,7 @@ static BOOL installfiles_cb(MSIPACKAGE *package, LPCWSTR file, DWORD action,
 
     if (action == MSICABEXTRACT_BEGINEXTRACT)
     {
-        if (!(f = find_file( package, file )))
+        if (!(f = find_file( package, disk_id, file )))
         {
             TRACE("unknown file in cabinet (%s)\n", debugstr_w(file));
             return FALSE;
@@ -394,7 +396,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
         }
         else if (file->state != msifs_installed && !(file->Attributes & msidbFileAttributesPatchAdded))
         {
-            ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->TargetPath));
+            ERR("compressed file wasn't installed (%s)\n", debugstr_w(file->File));
             rc = ERROR_INSTALL_FAILURE;
             goto done;
         }




More information about the wine-cvs mailing list