Module: wine Branch: master Commit: 1d6540bdc8bac62b759870cbb3da99c8005adca6 URL: http://source.winehq.org/git/wine.git/?a=commit;h=1d6540bdc8bac62b759870cbb3...
Author: Hans Leidekker hans@codeweavers.com Date: Mon May 30 09:27:53 2011 +0200
msi: Skip files from global assemblies in the RemoveFiles action.
---
dlls/msi/files.c | 19 +++++++++++++------ 1 files changed, 13 insertions(+), 6 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c index 8b2feb9..2ea119e 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -1164,7 +1164,10 @@ static UINT ITERATE_RemoveFiles(MSIRECORD *row, LPVOID param) TRACE("Skipping removal due to install mode\n"); return ERROR_SUCCESS; } - + if (comp->assembly && !comp->assembly->application) + { + return ERROR_SUCCESS; + } if (comp->Attributes & msidbComponentAttributesPermanent) { TRACE("permanent component, not removing file\n"); @@ -1266,15 +1269,19 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) MSIRECORD *uirow; LPWSTR dir, p; VS_FIXEDFILEINFO *ver; + MSICOMPONENT *comp = file->Component;
if ( file->state == msifs_installed ) ERR("removing installed file %s\n", debugstr_w(file->TargetPath));
- file->Component->Action = msi_get_component_action( package, file->Component ); - if (file->Component->Action != INSTALLSTATE_ABSENT || file->Component->Installed == INSTALLSTATE_SOURCE) + comp->Action = msi_get_component_action( package, comp ); + if (comp->Action != INSTALLSTATE_ABSENT || comp->Installed == INSTALLSTATE_SOURCE) + continue; + + if (comp->assembly && !comp->assembly->application) continue;
- if (file->Component->Attributes & msidbComponentAttributesPermanent) + if (comp->Attributes & msidbComponentAttributesPermanent) { TRACE("permanent component, not removing file\n"); continue; @@ -1299,7 +1306,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) { WARN("failed to delete %s (%u)\n", debugstr_w(file->TargetPath), GetLastError()); } - else if (!has_persistent_dir( package, file->Component )) + else if (!has_persistent_dir( package, comp )) { if ((dir = strdupW( file->TargetPath ))) { @@ -1312,7 +1319,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
uirow = MSI_CreateRecord( 9 ); MSI_RecordSetStringW( uirow, 1, file->FileName ); - MSI_RecordSetStringW( uirow, 9, file->Component->Directory ); + MSI_RecordSetStringW( uirow, 9, comp->Directory ); msi_ui_actiondata( package, szRemoveFiles, uirow ); msiobj_release( &uirow->hdr ); /* FIXME: call msi_ui_progress here? */