Commit d9a8f0b5 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: The options must include a source type.

parent 7fe6aad7
......@@ -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");
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment