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, ...@@ -1666,6 +1666,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
{ {
LPWSTR override; LPWSTR override;
MSIFEATURE *feature; MSIFEATURE *feature;
BOOL remove = !strcmpW(property, szRemove);
BOOL reinstall = !strcmpW(property, szReinstall);
override = msi_dup_property( package->db, property ); override = msi_dup_property( package->db, property );
if (!override) if (!override)
...@@ -1676,15 +1678,15 @@ static BOOL process_state_property(MSIPACKAGE* package, int level, ...@@ -1676,15 +1678,15 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
if (strcmpW( property, szRemove ) && !is_feature_selected( feature, level )) if (strcmpW( property, szRemove ) && !is_feature_selected( feature, level ))
continue; 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 (!strcmpiW( override, szAll ))
{ {
if (feature->Installed != state) feature->Action = state;
{ feature->ActionRequest = state;
feature->Action = state;
feature->ActionRequest = state;
}
} }
else else
{ {
...@@ -1698,11 +1700,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level, ...@@ -1698,11 +1700,8 @@ static BOOL process_state_property(MSIPACKAGE* package, int level,
if ((ptr2 && strlenW(feature->Feature) == len && !strncmpW(ptr, feature->Feature, len)) if ((ptr2 && strlenW(feature->Feature) == len && !strncmpW(ptr, feature->Feature, len))
|| (!ptr2 && !strcmpW(ptr, feature->Feature))) || (!ptr2 && !strcmpW(ptr, feature->Feature)))
{ {
if (feature->Installed != state) feature->Action = state;
{ feature->ActionRequest = state;
feature->Action = state;
feature->ActionRequest = state;
}
break; break;
} }
if (ptr2) 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