From d9a8f0b5fe0b33d1a0a7d909e5e1e05e23a73c34 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Mon, 5 Nov 2007 04:29:47 -0500 Subject: [PATCH] msi: The options must include a source type. --- dlls/msi/source.c | 3 +++ dlls/msi/tests/source.c | 10 ++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/dlls/msi/source.c b/dlls/msi/source.c index d1845379a55..f7dcf265e2a 100644 --- a/dlls/msi/source.c +++ b/dlls/msi/source.c @@ -606,6 +606,9 @@ UINT WINAPI MsiSourceListAddSourceExW( LPCWSTR szProduct, LPCWSTR szUserSid, if (!szSource || !*szSource) return ERROR_INVALID_PARAMETER; + if (!(dwOptions & (MSISOURCETYPE_NETWORK | MSISOURCETYPE_URL))) + return ERROR_INVALID_PARAMETER; + if (dwOptions & MSICODE_PATCH) { FIXME("Unhandled options MSICODE_PATCH\n"); diff --git a/dlls/msi/tests/source.c b/dlls/msi/tests/source.c index d81a29aeea9..bbef689674a 100644 --- a/dlls/msi/tests/source.c +++ b/dlls/msi/tests/source.c @@ -594,18 +594,12 @@ static void test_MsiSourceListAddSourceEx(void) r = pMsiSourceListAddSourceExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PRODUCT, "source", 0); - todo_wine - { - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - } + ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); r = pMsiSourceListAddSourceExA(prodcode, usersid, MSIINSTALLCONTEXT_USERUNMANAGED, MSICODE_PATCH, "source", 0); - todo_wine - { - ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); - } + ok(r == ERROR_INVALID_PARAMETER, "Expected ERROR_INVALID_PARAMETER, got %d\n", r); /* NULL szSource */ r = pMsiSourceListAddSourceExA(prodcode, usersid,