Module: wine Branch: master Commit: fe987103fb9bf1e119544d813cc93b7c2a44b952 URL: http://source.winehq.org/git/wine.git/?a=commit;h=fe987103fb9bf1e119544d813c...
Author: James Hawkins jhawkins@codeweavers.com Date: Tue Feb 19 02:09:33 2008 -0600
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 f129c5f..710383c 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 f25b476..013e7e9 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);