Commit 10a2a5ef authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

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

parent 7fbce31e
...@@ -537,7 +537,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) ...@@ -537,7 +537,7 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package )
if ( file->state == msifs_installed ) if ( file->state == msifs_installed )
ERR("removing installed file %s\n", debugstr_w(file->TargetPath)); ERR("removing installed file %s\n", debugstr_w(file->TargetPath));
if ( file->state != msifs_present ) if ( file->Component->ActionRequest != INSTALLSTATE_ABSENT )
continue; continue;
/* don't remove a file if the old file /* don't remove a file if the old file
......
...@@ -3199,7 +3199,10 @@ static void test_publish(void) ...@@ -3199,7 +3199,10 @@ static void test_publish(void)
r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL"); r = MsiInstallProductA(msifile, "FULL=1 REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %d\n", r); 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"); ok(pf_exists("msitest"), "File deleted\n");
state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}"); state = MsiQueryProductState("{7DF88A48-996F-4EC8-A022-BF956F9B2CBB}");
...@@ -4168,7 +4171,10 @@ static void test_removefiles(void) ...@@ -4168,7 +4171,10 @@ static void test_removefiles(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n"); ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
ok(!pf_exists("msitest\\helium"), "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"); ok(delete_pf("msitest", FALSE), "File deleted\n");
create_pf("msitest", FALSE); create_pf("msitest", FALSE);
...@@ -4186,8 +4192,11 @@ static void test_removefiles(void) ...@@ -4186,8 +4192,11 @@ static void test_removefiles(void)
r = MsiInstallProductA(msifile, "REMOVE=ALL"); r = MsiInstallProductA(msifile, "REMOVE=ALL");
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n"); ok(!pf_exists("msitest\\hydrogen"), "File not deleted\n");
ok(delete_pf("msitest\\helium", TRUE), "File deleted\n"); todo_wine
ok(delete_pf("msitest\\lithium", TRUE), "File deleted\n"); {
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"); ok(delete_pf("msitest", FALSE), "File deleted\n");
create_pf("msitest", FALSE); create_pf("msitest", FALSE);
...@@ -4228,7 +4237,10 @@ static void test_removefiles(void) ...@@ -4228,7 +4237,10 @@ static void test_removefiles(void)
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r); 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\\hydrogen", TRUE), "File not deleted\n");
ok(!delete_pf("msitest\\helium", 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\\furlong", TRUE), "File deleted\n");
ok(delete_pf("msitest\\firkin", TRUE), "File deleted\n"); ok(delete_pf("msitest\\firkin", TRUE), "File deleted\n");
ok(delete_pf("msitest\\fortnight", TRUE), "File deleted\n"); ok(delete_pf("msitest\\fortnight", TRUE), "File deleted\n");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment