From fe987103fb9bf1e119544d813cc93b7c2a44b952 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Tue, 19 Feb 2008 02:09:33 -0600 Subject: [PATCH] msi: Return the results from OpenSourceKey. --- dlls/msi/source.c | 5 ++--- dlls/msi/tests/source.c | 21 ++++++--------------- 2 files changed, 8 insertions(+), 18 deletions(-) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index f129c5f1218..710383cc5c9 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -81,7 +81,7 @@ static UINT OpenSourceKey(LPCWSTR szProduct, HKEY* key, DWORD dwOptions, rc = MSIREG_OpenLocalClassesProductKey(szProduct, &rootkey, create); } - if (rc) + if (rc != ERROR_SUCCESS) { if (dwOptions == MSICODE_PATCH) return ERROR_UNKNOWN_PATCH; @@ -424,8 +424,7 @@ UINT WINAPI MsiSourceListSetInfoW( LPCWSTR szProduct, LPCWSTR szUserSid, rc = OpenSourceKey(szProduct, &sourcekey, MSICODE_PRODUCT, dwContext, FALSE); if (rc != ERROR_SUCCESS) - return ERROR_UNKNOWN_PRODUCT; - + return rc; if (strcmpW(szProperty, INSTALLPROPERTY_MEDIAPACKAGEPATHW) == 0) { diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index f25b4769310..013e7e96cf7 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -1499,11 +1499,8 @@ static void test_MsiSourceListSetInfo(void) r = MsiSourceListSetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - } + ok(r == ERROR_BAD_CONFIGURATION, + "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); res = RegCreateKeyA(userkey, "SourceList", &source); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -1743,11 +1740,8 @@ static void test_MsiSourceListSetInfo(void) r = MsiSourceListSetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_USERMANAGED, MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - } + ok(r == ERROR_BAD_CONFIGURATION, + "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); res = RegCreateKeyA(userkey, "SourceList", &source); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res); @@ -1789,11 +1783,8 @@ static void test_MsiSourceListSetInfo(void) r = MsiSourceListSetInfoA(prodcode, NULL, MSIINSTALLCONTEXT_MACHINE, MSICODE_PRODUCT, INSTALLPROPERTY_MEDIAPACKAGEPATH, "path"); - todo_wine - { - ok(r == ERROR_BAD_CONFIGURATION, - "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); - } + ok(r == ERROR_BAD_CONFIGURATION, + "Expected ERROR_BAD_CONFIGURATION, got %d\n", r); res = RegCreateKeyA(prodkey, "SourceList", &source); ok(res == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", res);