msi: Improve feature action value evaluation in conditions.
Signed-off-by: Piotr Caban <piotr@codeweavers.com> Signed-off-by: Hans Leidekker <hans@codeweavers.com> Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
parent
41365ce72c
commit
b141a145c4
|
@ -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");
|
||||
|
|
Loading…
Reference in New Issue