Piotr Caban : msi: Improve "full uninstall" detection code.
Alexandre Julliard
julliard at winehq.org
Tue Oct 24 02:40:03 CDT 2017
Module: wine
Branch: master
Commit: c41b8ce5c360d2e602a7ad26e271e29c18759d5a
URL: http://source.winehq.org/git/wine.git/?a=commit;h=c41b8ce5c360d2e602a7ad26e271e29c18759d5a
Author: Piotr Caban <piotr at codeweavers.com>
Date: Fri Oct 20 22:18:33 2017 +0200
msi: Improve "full uninstall" detection code.
Signed-off-by: Piotr Caban <piotr at codeweavers.com>
Signed-off-by: Hans Leidekker <hans at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/msi/action.c | 17 ++++-------------
1 file changed, 4 insertions(+), 13 deletions(-)
diff --git a/dlls/msi/action.c b/dlls/msi/action.c
index da7af06..217d1dc 100644
--- a/dlls/msi/action.c
+++ b/dlls/msi/action.c
@@ -5351,25 +5351,16 @@ static UINT ACTION_UnpublishProduct(MSIPACKAGE *package)
static BOOL is_full_uninstall( MSIPACKAGE *package )
{
- WCHAR **features, *remove = msi_dup_property( package->db, szRemove );
MSIFEATURE *feature;
- BOOL ret = TRUE;
- UINT i;
LIST_FOR_EACH_ENTRY( feature, &package->features, MSIFEATURE, entry )
{
- if (feature->Action == INSTALLSTATE_LOCAL || feature->Action == INSTALLSTATE_SOURCE) ret = FALSE;
- }
-
- features = msi_split_string( remove, ',' );
- for (i = 0; features && features[i]; i++)
- {
- if (!strcmpW( features[i], szAll )) ret = TRUE;
+ if (feature->Action != INSTALLSTATE_ABSENT &&
+ (feature->Installed != INSTALLSTATE_ABSENT || feature->Action != INSTALLSTATE_UNKNOWN))
+ return FALSE;
}
- msi_free(features);
- msi_free(remove);
- return ret;
+ return TRUE;
}
static UINT ACTION_InstallFinalize(MSIPACKAGE *package)
More information about the wine-cvs
mailing list