From e8030ca17ff96a794a3fecd66bb01b81581a5451 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 22 May 2020 14:47:36 -0700 Subject: Fix naming of file in a merge module's cabinet The file was stored in the merge module's cabinet with plain FileId, without the modularization GUID. This change fixes the cabinet builder so that it adds the modularization GUID when creating the cabinet. --- src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'src/test') diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs index 5af256c1..075f7733 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiFixture.cs @@ -346,15 +346,32 @@ namespace WixToolsetTest.CoreIntegration result.AssertSuccess(); - Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.msm"))); + var msmPath = Path.Combine(intermediateFolder, @"bin\test.msm"); + Assert.True(File.Exists(msmPath)); Assert.True(File.Exists(Path.Combine(intermediateFolder, @"bin\test.wixpdb"))); var intermediate = Intermediate.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); var section = intermediate.Sections.Single(); var fileTuple = section.Tuples.OfType().Single(); + Assert.Equal("filyIq8rqcxxf903Hsn5K9L0SWV73g", fileTuple.Id.Id); Assert.Equal(Path.Combine(folder, @"data\test.txt"), fileTuple[FileTupleFields.Source].AsPath().Path); Assert.Equal(@"test.txt", fileTuple[FileTupleFields.Source].PreviousValue.AsPath().Path); + + var data = WindowsInstallerData.Load(Path.Combine(intermediateFolder, @"bin\test.wixpdb")); + var fileRows = data.Tables["File"].Rows; + Assert.Equal(new[] + { + "filyIq8rqcxxf903Hsn5K9L0SWV73g.243FB739_4D05_472F_9CFB_EF6B1017B6DE" + }, fileRows.Select(r => r.FieldAsString(0)).ToArray()); + + var cabPath = Path.Combine(intermediateFolder, "msm-test.cab"); + Query.ExtractStream(msmPath, "MergeModule.CABinet", cabPath); + var files = Query.GetCabinetFiles(cabPath); + Assert.Equal(new[] + { + "filyIq8rqcxxf903Hsn5K9L0SWV73g.243FB739_4D05_472F_9CFB_EF6B1017B6DE" + }, files.Select(f => Path.Combine(f.Path, f.Name)).ToArray()); } } -- cgit v1.2.3-55-g6feb