msi: Don't remove a misc file if the action is unknown.

This commit is contained in:
James Hawkins 2008-08-21 02:18:40 -05:00 committed by Alexandre Julliard
parent 7c9873e471
commit 472b991958
2 changed files with 4 additions and 4 deletions

View File

@ -439,6 +439,9 @@ static BOOL verify_comp_for_removal(MSICOMPONENT *comp, UINT install_mode)
{
INSTALLSTATE request = comp->ActionRequest;
if (request == INSTALLSTATE_UNKNOWN)
return FALSE;
if (install_mode == msidbRemoveFileInstallModeOnInstall &&
(request == INSTALLSTATE_LOCAL || request == INSTALLSTATE_SOURCE))
return TRUE;

View File

@ -4317,10 +4317,7 @@ static void test_removefiles(void)
ok(delete_pf("msitest\\attoparsec", TRUE), "File deleted\n");
ok(!delete_pf("msitest\\storeys", TRUE), "File not deleted\n");
ok(!delete_pf("msitest\\block", TRUE), "File not deleted\n");
todo_wine
{
ok(delete_pf("msitest\\siriometer", TRUE), "File deleted\n");
}
ok(delete_pf("msitest\\siriometer", TRUE), "File deleted\n");
ok(pf_exists("msitest\\cabout"), "Directory deleted\n");
ok(pf_exists("msitest"), "Directory deleted\n");