James Hawkins : msi: Don't publish features to an invalid location.

Alexandre Julliard julliard at winehq.org
Wed Jun 18 12:58:45 CDT 2008


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

Author: James Hawkins <jhawkins at codeweavers.com>
Date:   Wed Jun 18 00:55:09 2008 -0500

msi: Don't publish features to an invalid location.

---

 dlls/msi/action.c        |    7 -------
 dlls/msi/tests/install.c |    8 +-------
 2 files changed, 1 insertions(+), 14 deletions(-)

diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index fa5900c..d3aeb38 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -3733,17 +3733,12 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
 {
     MSIFEATURE *feature;
     UINT rc;
-    HKEY hkey=0;
     HKEY hukey=0;
     HKEY userdata=0;
 
     if (!msi_check_publish(package))
         return ERROR_SUCCESS;
 
-    rc = MSIREG_OpenFeaturesKey(package->ProductCode,&hkey,TRUE);
-    if (rc != ERROR_SUCCESS)
-        goto end;
-
     rc = MSIREG_OpenUserFeaturesKey(package->ProductCode,&hukey,TRUE);
     if (rc != ERROR_SUCCESS)
         goto end;
@@ -3801,7 +3796,6 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
             strcatW(data,feature->Feature_Parent);
         }
 
-        msi_reg_set_val_str( hkey, feature->Feature, data );
         msi_reg_set_val_str( userdata, feature->Feature, data );
         msi_free(data);
 
@@ -3837,7 +3831,6 @@ static UINT ACTION_PublishFeatures(MSIPACKAGE *package)
     }
 
 end:
-    RegCloseKey(hkey);
     RegCloseKey(hukey);
     return rc;
 }
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 84ffdb6..9a952d3 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -2522,13 +2522,7 @@ static void test_publish_publishfeatures(void)
     ok(delete_pf("msitest", FALSE), "File not installed\n");
 
     res = RegOpenKeyA(HKEY_LOCAL_MACHINE, featkey, &hkey);
-    todo_wine
-    {
-        ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
-    }
-
-    if (res == ERROR_SUCCESS)
-        RegCloseKey(hkey);
+    ok(res == ERROR_FILE_NOT_FOUND, "Expected ERROR_FILE_NOT_FOUND, got %d\n", res);
 
     res = RegOpenKeyA(HKEY_CURRENT_USER, cupath, &hkey);
     ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);




More information about the wine-cvs mailing list