James Hawkins : msi: Don't remove a file that is installed as source.
Alexandre Julliard
julliard at winehq.org
Thu Aug 21 10:02:28 CDT 2008
Module: wine
Branch: master
Commit: f909e1c06ed7723eb6524ec3faeb11ea610cb8b5
URL: http://source.winehq.org/git/wine.git/?a=commit;h=f909e1c06ed7723eb6524ec3faeb11ea610cb8b5
Author: James Hawkins <jhawkins at codeweavers.com>
Date: Thu Aug 21 02:17:15 2008 -0500
msi: Don't remove a file that is installed as source.
---
dlls/msi/files.c | 3 ++-
dlls/msi/tests/install.c | 2 +-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/dlls/msi/files.c b/dlls/msi/files.c
index 6de1c5a..945390e 100644
--- a/dlls/msi/files.c
+++ b/dlls/msi/files.c
@@ -547,7 +547,8 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
if ( file->state == msifs_installed )
ERR("removing installed file %s\n", debugstr_w(file->TargetPath));
- if ( file->Component->ActionRequest != INSTALLSTATE_ABSENT )
+ if ( file->Component->ActionRequest != INSTALLSTATE_ABSENT ||
+ file->Component->Installed == INSTALLSTATE_SOURCE )
continue;
/* don't remove a file if the old file
diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c
index 1c361a3..9727393 100644
--- a/dlls/msi/tests/install.c
+++ b/dlls/msi/tests/install.c
@@ -4269,9 +4269,9 @@ static void test_removefiles(void)
r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
+ ok(delete_pf("msitest\\helium", TRUE), "File deleted\n");
todo_wine
{
- ok(delete_pf("msitest\\helium", TRUE), "File deleted\n");
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
}
ok(delete_pf("msitest", FALSE), "File deleted\n");
More information about the wine-cvs
mailing list