From e1ff7245ee176c18bd0b773a7e11df6bb95d7b7e Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 1 Sep 2020 18:31:26 -0400 Subject: Fix check for valid 8.3 names for >3 extensions. --- src/WixToolset.Core/Common.cs | 2 +- src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 4 ++++ .../WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs | 4 ++++ 3 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/WixToolset.Core/Common.cs b/src/WixToolset.Core/Common.cs index 6efc7571..1bb895be 100644 --- a/src/WixToolset.Core/Common.cs +++ b/src/WixToolset.Core/Common.cs @@ -253,7 +253,7 @@ namespace WixToolset.Core { return filename.Length < 9; } - else if (expectedDot > 8 || filename[expectedDot] != '.') + else if (expectedDot > 8 || filename[expectedDot] != '.' || expectedDot + 4 < filename.Length) { return false; } diff --git a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 158687cf..f5353c87 100644 --- a/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs @@ -371,6 +371,10 @@ namespace WixToolsetTest.CoreIntegration WixAssert.CompareLineByLine(new[] { "Directory:DUPLICATENAMEANDSHORTNAME\tINSTALLFOLDER\tduplicat", + "Directory:Folder1\tINSTALLFOLDER\tFolder.1", + "Directory:Folder12\tINSTALLFOLDER\tFolder.12", + "Directory:Folder123\tINSTALLFOLDER\tFolder.123", + "Directory:Folder1234\tINSTALLFOLDER\tyakwclwy|Folder.1234", "Directory:INSTALLFOLDER\tProgramFiles6432Folder\t1egc1laj|MsiPackage", "Directory:NAMEANDSHORTNAME\tINSTALLFOLDER\tSHORTNAM|NameAndShortName", "Directory:NAMEANDSHORTSOURCENAME\tINSTALLFOLDER\tNAMEASSN|NameAndShortSourceName", diff --git a/src/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs b/src/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs index a217fa34..2f277956 100644 --- a/src/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs +++ b/src/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs @@ -17,6 +17,10 @@ + + + + -- cgit v1.2.3-55-g6feb