msi: Fix feature actions overriding in process_state_property.

This commit is contained in:
Piotr Caban 2014-07-24 12:35:31 +02:00 committed by Alexandre Julliard
parent 331c86f124
commit 0dff7bff9a
1 changed files with 10 additions and 11 deletions

View File

@ -1666,6 +1666,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
{
LPWSTR override;
MSIFEATURE *feature;
BOOL remove = !strcmpW(property, szRemove);
BOOL reinstall = !strcmpW(property, szReinstall);
override = msi_dup_property( package->db, property );
if (!override)
@ -1676,16 +1678,16 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
if (strcmpW( property, szRemove ) && !is_feature_selected( feature, level ))
continue;
if (!strcmpW(property, szReinstall)) state = feature->Installed;
if (reinstall)
state = (feature->Installed == INSTALLSTATE_ABSENT ? INSTALLSTATE_UNKNOWN : feature->Installed);
else if (remove)
state = (feature->Installed == INSTALLSTATE_ABSENT ? INSTALLSTATE_UNKNOWN : INSTALLSTATE_ABSENT);
if (!strcmpiW( override, szAll ))
{
if (feature->Installed != state)
{
feature->Action = state;
feature->ActionRequest = state;
}
}
else
{
LPWSTR ptr = override;
@ -1697,12 +1699,9 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
if ((ptr2 && strlenW(feature->Feature) == len && !strncmpW(ptr, feature->Feature, len))
|| (!ptr2 && !strcmpW(ptr, feature->Feature)))
{
if (feature->Installed != state)
{
feature->Action = state;
feature->ActionRequest = state;
}
break;
}
if (ptr2)