[4/5] msi: Always evaluate component conditions.

Hans Leidekker hans at codeweavers.com
Tue Apr 27 06:30:10 CDT 2010


Fixes a regression caused by 0d770c96fe3172a7db64d7efb7819a70a6352370.
See http://bugs.winehq.org/show_bug.cgi?id=22145
---
 dlls/msi/action.c |   20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index 7f2fd7e..5168cf9 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -2062,7 +2062,7 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
 
     if (!process_overrides( package, msi_get_property_int( package->db, szlevel, 1 ) ))
     {
-        TRACE("Evaluating Condition Table\n");
+        TRACE("Evaluating feature conditions\n");
 
         rc = MSI_DatabaseOpenViewW( package->db, ConditionQuery, &view );
         if (rc == ERROR_SUCCESS)
@@ -2070,18 +2070,18 @@ static UINT ACTION_CostFinalize(MSIPACKAGE *package)
             rc = MSI_IterateRecords( view, NULL, ITERATE_CostFinalizeConditions, package );
             msiobj_release( &view->hdr );
         }
+    }
+    TRACE("Evaluating component conditions\n");
 
-        TRACE("Enabling or Disabling Components\n");
-        LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
+    LIST_FOR_EACH_ENTRY( comp, &package->components, MSICOMPONENT, entry )
+    {
+        if (MSI_EvaluateConditionW( package, comp->Condition ) == MSICONDITION_FALSE)
         {
-            if (MSI_EvaluateConditionW( package, comp->Condition ) == MSICONDITION_FALSE)
-            {
-                TRACE("Disabling component %s\n", debugstr_w(comp->Component));
-                comp->Enabled = FALSE;
-            }
-            else
-                comp->Enabled = TRUE;
+            TRACE("Disabling component %s\n", debugstr_w(comp->Component));
+            comp->Enabled = FALSE;
         }
+        else
+            comp->Enabled = TRUE;
     }
 
     msi_set_property( package->db, szCosting, szOne );
-- 
1.7.0.4







More information about the wine-patches mailing list