Commit 5e2bc5b3 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: If a feature's action is INSTALLSTATE_UNKNOWN, MsiEvaluateCondition should…

msi: If a feature's action is INSTALLSTATE_UNKNOWN, MsiEvaluateCondition should return MSICONDITION_FALSE.
parent eb836b71
......@@ -317,7 +317,11 @@ value_i:
INSTALLSTATE install = INSTALLSTATE_UNKNOWN, action = INSTALLSTATE_UNKNOWN;
MSI_GetFeatureStateW(cond->package, $2, &install, &action );
$$ = action;
if (action == INSTALLSTATE_UNKNOWN)
$$ = MSICONDITION_FALSE;
else
$$ = action;
msi_free( $2 );
}
| COND_EXCLAM identifier
......
......@@ -986,6 +986,9 @@ static void test_condition(void)
r = MsiEvaluateCondition(hpkg, "0");
ok( r == MSICONDITION_FALSE, "wrong return val\n");
r = MsiEvaluateCondition(hpkg, "-1");
ok( r == MSICONDITION_TRUE, "wrong return val\n");
r = MsiEvaluateCondition(hpkg, "0 = 0");
ok( r == MSICONDITION_TRUE, "wrong return val\n");
......@@ -1622,6 +1625,10 @@ static void test_condition(void)
r = MsiEvaluateCondition(hpkg, "X !=\"\" and (X =\"5.0\" or X =\"5.1\" or X =\"6.0\")");
ok( r == MSICONDITION_ERROR, "wrong return val (%d)\n", r);
/* feature doesn't exist */
r = MsiEvaluateCondition(hpkg, "&nofeature");
ok( r == MSICONDITION_FALSE, "wrong return val (%d)\n", r);
MsiCloseHandle( hpkg );
DeleteFile(msifile);
}
......
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