Hans Leidekker : msi: Honor msidbComponentAttributesPermanent.
Alexandre Julliard
julliard at winehq.org
Tue Nov 16 12:45:44 CST 2010
Module: wine
Branch: master
Commit: 7cd084d0416f807d1ea84943e0c37c0991ca918f
URL: http://source.winehq.org/git/wine.git/?a=commit;h=7cd084d0416f807d1ea84943e0c37c0991ca918f
Author: Hans Leidekker <hans at codeweavers.com>
Date: Tue Nov 16 09:07:07 2010 +0100
msi: Honor msidbComponentAttributesPermanent.
---
dlls/msi/files.c | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index db1a962..9aeaaf3 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -925,12 +925,6 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
install_mode = MSI_RecordGetInteger(row, 5);
comp = get_loaded_component(package, component);
- if (!comp)
- {
- ERR("Invalid component: %s\n", debugstr_w(component));
- return ERROR_FUNCTION_FAILED;
- }
-
if (!comp->Enabled)
{
TRACE("component is disabled\n");
@@ -944,6 +938,12 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param)
return ERROR_SUCCESS;
}
+ if (comp->Attributes & msidbComponentAttributesPermanent)
+ {
+ TRACE("permanent component, not removing file\n");
+ return ERROR_SUCCESS;
+ }
+
dir = msi_dup_property(package->db, dirprop);
if (!dir)
return ERROR_OUTOFMEMORY;
@@ -1027,6 +1027,12 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
continue;
}
+ if (file->Component->Attributes & msidbComponentAttributesPermanent)
+ {
+ TRACE("permanent component, not removing file\n");
+ continue;
+ }
+
if (file->Version)
{
ver = msi_get_disk_file_version( file->TargetPath );
More information about the wine-cvs
mailing list