msi: Only check the presence of the cabinet if the file is compressed.

This commit is contained in:
James Hawkins 2007-11-15 03:01:06 -06:00 committed by Alexandre Julliard
parent 0023759a4b
commit b1507aee98
2 changed files with 4 additions and 3 deletions

View File

@ -637,7 +637,8 @@ static UINT ready_media(MSIPACKAGE *package, MSIFILE *file, struct media_info *m
}
}
if (mi->cabinet && GetFileAttributesW(mi->cabinet) == INVALID_FILE_ATTRIBUTES)
if (file->IsCompressed && mi->cabinet &&
GetFileAttributesW(mi->cabinet) == INVALID_FILE_ATTRIBUTES)
{
ERR("Cabinet not found: %s\n", debugstr_w(mi->cabinet));
return ERROR_INSTALL_FAILURE;

View File

@ -3536,8 +3536,8 @@ static void test_missingcab(void)
todo_wine
{
ok(r == ERROR_SUCCESS, "Expected ERROR_SUCCESS, got %u\n", r);
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
}
ok(delete_pf("msitest\\augustus", TRUE), "File not installed\n");
ok(delete_pf("msitest\\caesar", TRUE), "File not installed\n");
ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n");
ok(!delete_pf("msitest\\gaius", TRUE), "File installed\n");
@ -3552,8 +3552,8 @@ static void test_missingcab(void)
{
ok(r == ERROR_INSTALL_FAILURE, "Expected ERROR_INSTALL_FAILURE, got %u\n", r);
ok(!delete_pf("msitest\\maximus", TRUE), "File installed\n");
ok(!delete_pf("msitest\\augustus", TRUE), "File installed\n");
}
ok(!delete_pf("msitest\\augustus", TRUE), "File installed\n");
ok(delete_pf("msitest\\caesar", TRUE), "File removed\n");
ok(delete_pf("msitest\\gaius", TRUE), "File removed\n");
ok(delete_pf("msitest", FALSE), "File not installed\n");