msi: if a table for a given action does not exist do not cause the action to fail

Aric Stewart aric at codeweavers.com
Mon Jul 19 19:29:43 CDT 2004


This time... with the patch

If the data table for a called action does not exist (for example 
CreateFolders wants a CreateFolder table to read the data from) do not 
fail, instead just do not perform the action.

this allows msxml3usa.msi to install.

-aric

-------------- next part --------------
Index: dlls/msi/action.c
===================================================================
RCS file: /home/wine/wine/dlls/msi/action.c,v
retrieving revision 1.31
diff -u -w -r1.31 action.c
--- dlls/msi/action.c	19 Jul 2004 19:35:05 -0000	1.31
+++ dlls/msi/action.c	20 Jul 2004 00:18:46 -0000
@@ -1324,7 +1324,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view );
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -1702,14 +1702,14 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, Query, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
    
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
     {
         MSI_ViewClose(view);
         msiobj_release(&view->hdr);
-        return rc;
+        return ERROR_SUCCESS;
     }
 
     while (1)
@@ -2017,9 +2017,8 @@
     TRACE("Building Directory properties\n");
 
     rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
-    if (rc != ERROR_SUCCESS)
-        return rc;
-
+    if (rc == ERROR_SUCCESS)
+    {
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
     {
@@ -2055,6 +2054,7 @@
      }
     MSI_ViewClose(view);
     msiobj_release(&view->hdr);
+    }
 
     TRACE("File calculations %i files\n",package->loaded_files);
 
@@ -2122,9 +2122,8 @@
     TRACE("Evaluating Condition Table\n");
 
     rc = MSI_DatabaseOpenViewW(package->db, ConditionQuery, &view);
-    if (rc != ERROR_SUCCESS)
-        return rc;
-
+    if (rc == ERROR_SUCCESS)
+    {
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
     {
@@ -2159,11 +2158,12 @@
             LPWSTR Condition;
             Condition = load_dynamic_stringW(row,3);
 
-            if (MSI_EvaluateConditionW(package,Condition) == MSICONDITION_TRUE)
+                if (MSI_EvaluateConditionW(package,Condition) == 
+                    MSICONDITION_TRUE)
             {
                 int level = MSI_RecordGetInteger(row,2);
-                TRACE("Reseting feature %s to level %i\n",debugstr_w(Feature),
-                       level);
+                    TRACE("Reseting feature %s to level %i\n",
+                           debugstr_w(Feature), level);
                 package->features[feature_index].Level = level;
             }
             HeapFree(GetProcessHeap(),0,Condition);
@@ -2173,6 +2173,7 @@
     }
     MSI_ViewClose(view);
     msiobj_release(&view->hdr);
+    }
 
     TRACE("Enabling or Disabling Components\n");
     for (i = 0; i < package->loaded_components; i++)
@@ -2558,7 +2559,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -2768,7 +2769,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -3076,7 +3077,8 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, q1, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
+
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
     {
@@ -3119,7 +3121,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -3328,7 +3330,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, Query, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -3569,7 +3571,10 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, ExecSeqQuery, &view);
     if (rc != ERROR_SUCCESS)
+    {
+        rc = ERROR_SUCCESS;
         goto end;
+    }
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -3836,7 +3841,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, Query, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -3922,7 +3927,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, Query, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)
@@ -4102,7 +4107,7 @@
 
     rc = MSI_DatabaseOpenViewW(package->db, Query, &view);
     if (rc != ERROR_SUCCESS)
-        return rc;
+        return ERROR_SUCCESS;
 
     rc = MSI_ViewExecute(view, 0);
     if (rc != ERROR_SUCCESS)


More information about the wine-patches mailing list