Commit f909e1c0 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

msi: Don't remove a file that is installed as source.

parent 4553d0fd
...@@ -547,7 +547,8 @@ UINT ACTION_RemoveFiles( MSIPACKAGE *package ) ...@@ -547,7 +547,8 @@ 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->Component->ActionRequest != INSTALLSTATE_ABSENT ) if ( file->Component->ActionRequest != INSTALLSTATE_ABSENT ||
file->Component->Installed == INSTALLSTATE_SOURCE )
continue; continue;
/* don't remove a file if the old file /* don't remove a file if the old file
......
...@@ -4269,9 +4269,9 @@ static void test_removefiles(void) ...@@ -4269,9 +4269,9 @@ 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 todo_wine
{ {
ok(delete_pf("msitest\\helium", TRUE), "File deleted\n");
ok(delete_pf("msitest\\lithium", 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");
......
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