Commit b141a145 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msi: Improve feature action value evaluation in conditions.

parent 41365ce7
......@@ -318,11 +318,14 @@ value_i:
| COND_AMPER identifier
{
COND_input* cond = (COND_input*) info;
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
INSTALLSTATE install, action;
MSI_GetFeatureStateW(cond->package, $2, &install, &action );
if (action == INSTALLSTATE_UNKNOWN)
if (MSI_GetFeatureStateW(cond->package, $2, &install, &action ) != ERROR_SUCCESS)
{
FIXME("condition may be evaluated incorrectly\n");
/* we should return empty string in this case */
$$ = MSICONDITION_FALSE;
}
else
$$ = action;
......
......@@ -2069,6 +2069,8 @@ static void test_condition(void)
/* feature doesn't exist */
r = MsiEvaluateConditionA(hpkg, "&nofeature");
ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r);
r = MsiEvaluateConditionA(hpkg, "&nofeature=\"\"");
todo_wine ok( r == MSICONDITION_TRUE, "wrong return val (%d)\n", r);
MsiSetPropertyA(hpkg, "A", "2");
MsiSetPropertyA(hpkg, "X", "50");
......
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