Commit 472b9919 authored by James Hawkins's avatar James Hawkins Committed by Alexandre Julliard

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

parent 7c9873e4
......@@ -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;
......
......@@ -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");
......
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