Commit 0dff7bff authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msi: Fix feature actions overriding in process_state_property.

parent 331c86f1
......@@ -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;
......@@ -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;
}
break;
}
if (ptr2)
......
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