msi: Fix feature actions overriding in process_state_property.
This commit is contained in:
parent
331c86f124
commit
0dff7bff9a
|
@ -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,15 +1678,15 @@ 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;
|
||||
}
|
||||
feature->Action = state;
|
||||
feature->ActionRequest = state;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -1698,11 +1700,8 @@ 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;
|
||||
}
|
||||
feature->Action = state;
|
||||
feature->ActionRequest = state;
|
||||
break;
|
||||
}
|
||||
if (ptr2)
|
||||
|
|
Loading…
Reference in New Issue