msi: Base removal of a file on the component's action, not the file's state.

This commit is contained in:
James Hawkins 2008-08-18 23:13:43 -05:00 committed by Alexandre Julliard
parent 7fbce31ef7
commit 10a2a5effe
2 changed files with 18 additions and 6 deletions

View File

@ -537,7 +537,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
if ( file->state == msifs_installed )
ERR("removing installed file %s\n", debugstr_w(file->TargetPath));
if ( file->state != msifs_present )
if ( file->Component->ActionRequest != INSTALLSTATE_ABSENT )
continue;
/* don't remove a file if the old file

View File

@ -3199,7 +3199,10 @@ static void test_publish(void)
r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r);
ok(pf_exists("msitest\\maximus"), "File deleted\n");
todo_wine
{
ok(pf_exists("msitest\\maximus"), "File deleted\n");
}
ok(pf_exists("msitest"), "File deleted\n");
state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
@ -4168,7 +4171,10 @@ static void test_removefiles(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
ok(!pf_exists("msitest\\helium"), "File not deleted\n");
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
todo_wine
{
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
}
ok(delete_pf("msitest", FALSE), "File deleted\n");
create_pf("msitest", FALSE);
@ -4186,8 +4192,11 @@ 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");
ok(delete_pf("msitest\\lithium", 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");
create_pf("msitest", FALSE);
@ -4228,7 +4237,10 @@ static void test_removefiles(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!delete_pf("msitest\\hydrogen", TRUE), "File not deleted\n");
ok(!delete_pf("msitest\\helium", TRUE), "File not deleted\n");
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
todo_wine
{
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n");
}
ok(delete_pf("msitest\\furlong", TRUE), "File deleted\n");
ok(delete_pf("msitest\\firkin", TRUE), "File deleted\n");
ok(delete_pf("msitest\\fortnight", TRUE), "File deleted\n");