From 5b8282120a676e66a0e767438cb8abfe43bddd58 Mon Sep 17 00:00:00 2001 From: James Hawkins Date: Wed, 7 Feb 2007 21:58:14 -0600 Subject: [PATCH] msi: Don't skip files continued from a previous cabinet. --- dlls/msi/files.c | 2 +- dlls/msi/tests/install.c | 43 ++++++++++++++++++++++++++++++++++++++++ 2 files changed, 44 insertions(+), 1 deletion(-) diff --git a/dlls/msi/files.c b/dlls/msi/files.c index e370b1e954f..61992a329ad 100644 --- a/dlls/msi/files.c +++ b/dlls/msi/files.c @@ -716,7 +716,7 @@ UINT ACTION_InstallFiles(MSIPACKAGE *package) LIST_FOR_EACH_ENTRY( file, &package->files, MSIFILE, entry ) { - if (file->state != msifs_missing && file->state != msifs_overwrite) + if (file->state != msifs_missing && !mi->is_continuous && file->state != msifs_overwrite) continue; if (file->Sequence > mi->last_sequence || mi->is_continuous || diff --git a/dlls/msi/tests/install.c b/dlls/msi/tests/install.c index 00b7763e2f0..7a8412bea1d 100644 --- a/dlls/msi/tests/install.c +++ b/dlls/msi/tests/install.c @@ -214,6 +214,13 @@ static const CHAR mm_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tV "Media\tDiskId\n" "1\t3\t\ttest1.cab\tDISK1\t\n"; +static const CHAR ss_media_dat[] = "DiskId\tLastSequence\tDiskPrompt\tCabinet\tVolumeLabel\tSource\n" + "i2\ti4\tL64\tS255\tS32\tS72\n" + "Media\tDiskId\n" + "1\t2\t\ttest1.cab\tDISK1\t\n" + "2\t2\t\ttest2.cab\tDISK2\t\n" + "3\t12\t\ttest3.cab\tDISK3\t\n"; + typedef struct _msi_table { const CHAR *filename; @@ -286,6 +293,18 @@ static const msi_table mm_tables[] = ADD_TABLE(property), }; +static const msi_table ss_tables[] = +{ + ADD_TABLE(cc_component), + ADD_TABLE(directory), + ADD_TABLE(cc_feature), + ADD_TABLE(cc_feature_comp), + ADD_TABLE(cc_file), + ADD_TABLE(install_exec_seq), + ADD_TABLE(ss_media), + ADD_TABLE(property), +}; + /* cabinet definitions */ /* make the max size large so there is only one cab file */ @@ -1021,6 +1040,29 @@ static void test_mixedmedia(void) DeleteFile(msifile); } +static void test_samesequence(void) +{ + UINT r; + + create_cc_test_files(); + create_database(msifile, ss_tables, sizeof(ss_tables) / sizeof(msi_table)); + + MsiSetInternalUI(INSTALLUILEVEL_NONE, NULL); + + r = MsiInstallProductA(msifile, NULL); + 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\\caesar", TRUE), "File not installed\n"); + } + ok(delete_pf("msitest\\maximus", TRUE), "File not installed\n"); + ok(delete_pf("msitest", FALSE), "File not installed\n"); + + delete_cab_files(); + DeleteFile(msifile); +} + START_TEST(install) { DWORD len; @@ -1044,6 +1086,7 @@ START_TEST(install) test_continuouscabs(); test_caborder(); test_mixedmedia(); + test_samesequence(); SetCurrentDirectoryA(prev_path); }