Hans Leidekker : msi: Check file state before installing global assemblies.

Alexandre Julliard julliard at wine.codeweavers.com
Wed Mar 25 10:13:23 CDT 2015


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

Author: Hans Leidekker <hans at codeweavers.com>
Date:   Wed Mar 25 14:33:48 2015 +0100

msi: Check file state before installing global assemblies.

---

 dlls/msi/files.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 4337d51..40cc3f6 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -340,7 +340,6 @@ WCHAR *msi_resolve_file_source( MSIPACKAGE *package, MSIFILE *file )
 UINT ACTION_InstallFiles(MSIPACKAGE *package)
 {
     MSIMEDIAINFO *mi;
-    MSICOMPONENT *comp;
     UINT rc = ERROR_SUCCESS;
     MSIFILE *file;
 
@@ -418,18 +417,19 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package)
             goto done;
         }
     }
-    LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
+    LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry )
     {
-        comp->Action = msi_get_component_action( package, comp );
-        if (comp->Action == INSTALLSTATE_LOCAL && comp->assembly && !comp->assembly->installed)
+        MSICOMPONENT *comp = file->Component;
+
+        if (!comp->assembly || (file->state != msifs_missing && file->state != msifs_overwrite))
+            continue;
+
+        rc = msi_install_assembly( package, comp );
+        if (rc != ERROR_SUCCESS)
         {
-            rc = msi_install_assembly( package, comp );
-            if (rc != ERROR_SUCCESS)
-            {
-                ERR("Failed to install assembly\n");
-                rc = ERROR_INSTALL_FAILURE;
-                break;
-            }
+            ERR("Failed to install assembly\n");
+            rc = ERROR_INSTALL_FAILURE;
+            break;
         }
     }
 




More information about the wine-cvs mailing list