From 035eccfb7400a8e6099e239b2b39116d95ddfb9f Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 24 Mar 2023 11:43:06 -0700 Subject: File and folder names that start with dots are not valid short names Fixes 7313 --- src/wix/WixToolset.Core/Common.cs | 2 +- src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs | 1 + .../WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/wix/WixToolset.Core/Common.cs b/src/wix/WixToolset.Core/Common.cs index 2a054fa9..bcaa25af 100644 --- a/src/wix/WixToolset.Core/Common.cs +++ b/src/wix/WixToolset.Core/Common.cs @@ -249,7 +249,7 @@ namespace WixToolset.Core { return filename.Length < 9; } - else if (expectedDot > 8 || filename[expectedDot] != '.' || expectedDot + 4 < filename.Length) + else if (expectedDot == 0 || expectedDot > 8 || filename[expectedDot] != '.' || expectedDot + 4 < filename.Length) { return false; } diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index 52bf9d29..006610d1 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs @@ -282,6 +282,7 @@ namespace WixToolsetTest.CoreIntegration "Directory:Folder12\tINSTALLFOLDER\tFolder.12", "Directory:Folder123\tINSTALLFOLDER\tFolder.123", "Directory:Folder1234\tINSTALLFOLDER\tyakwclwy|Folder.1234", + "Directory:GitFolder\tINSTALLFOLDER\t69sdfw2d|.git", "Directory:INSTALLFOLDER\tProgramFiles6432Folder\t1egc1laj|MsiPackage", "Directory:NAMEANDSHORTNAME\tINSTALLFOLDER\tSHORTNAM|NameAndShortName", "Directory:NAMEANDSHORTSOURCENAME\tINSTALLFOLDER\tNAMEASSN|NameAndShortSourceName", diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs index 2f277956..298b6c54 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultDir/DefaultDir.wxs @@ -21,6 +21,7 @@ + -- cgit v1.2.3-55-g6feb