Skip to content

Commit

Permalink
Not generating short file names that might result in wrong file match
Browse files Browse the repository at this point in the history
  • Loading branch information
nirbar committed Nov 14, 2024
1 parent f440fb3 commit b9c31e2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 17 deletions.
8 changes: 4 additions & 4 deletions src/ext/Util/test/WixToolsetTest.Util/UtilExtensionFixture.cs
Original file line number Diff line number Diff line change
Expand Up @@ -109,8 +109,8 @@ public void CanBuildInternetShortcutInProduct()
"CustomAction:Wix4CreateInternetShortcuts_X64\t3073\tWix4UtilCA_X64\tWixCreateInternetShortcuts\t",
"CustomAction:Wix4RollbackInternetShortcuts_X64\t3329\tWix4UtilCA_X64\tWixRollbackInternetShortcuts\t",
"CustomAction:Wix4SchedInternetShortcuts_X64\t1\tWix4UtilCA_X64\tWixSchedInternetShortcuts\t",
"RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y\tPackage.ico\thoiptxrr.url|WiX Toolset (url).url\tINSTALLFOLDER\t2",
"RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A\tPackage.ico\tjcxd1dwf.lnk|WiX Toolset (link).lnk\tINSTALLFOLDER\t2",
"RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y\tPackage.ico\tWiX Toolset (url).url\tINSTALLFOLDER\t2",
"RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A\tPackage.ico\tWiX Toolset (link).lnk\tINSTALLFOLDER\t2",
"Wix4InternetShortcut:uisdCsU32.1i4Hebrg1N7E194zJQ8Y\tPackage.ico\tINSTALLFOLDER\tWiX Toolset (url).url\thttps://wixtoolset.org\t1\t[#Package.ico]\t0",
"Wix4InternetShortcut:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A\tPackage.ico\tINSTALLFOLDER\tWiX Toolset (link).lnk\thttps://wixtoolset.org\t0\t[#Package.ico]\t0",
}, results.OrderBy(s => s).ToArray());
Expand All @@ -129,8 +129,8 @@ public void CanBuildInternetShortcutInMergeModule()
"CustomAction:Wix4CreateInternetShortcuts_X64\t3073\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixCreateInternetShortcuts\t",
"CustomAction:Wix4RollbackInternetShortcuts_X64\t3329\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixRollbackInternetShortcuts\t",
"CustomAction:Wix4SchedInternetShortcuts_X64\t1\tWix4UtilCA_X64.047730A5_30FE_4A62_A520_DA9381B8226A\tWixSchedInternetShortcuts\t",
"RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\thoiptxrr.url|WiX Toolset (url).url\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2",
"RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tjcxd1dwf.lnk|WiX Toolset (link).lnk\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2",
"RemoveFile:uisdCsU32.1i4Hebrg1N7E194zJQ8Y.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (url).url\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2",
"RemoveFile:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (link).lnk\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\t2",
"Wix4InternetShortcut:uisdCsU32.1i4Hebrg1N7E194zJQ8Y.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (url).url\thttps://wixtoolset.org\t1\t[#Package.ico.047730A5_30FE_4A62_A520_DA9381B8226A]\t0",
"Wix4InternetShortcut:uisjV.q0ROZZYR3h_lkpbkZtLtPH0A.047730A5_30FE_4A62_A520_DA9381B8226A\tPackage.ico.047730A5_30FE_4A62_A520_DA9381B8226A\tINSTALLFOLDER.047730A5_30FE_4A62_A520_DA9381B8226A\tWiX Toolset (link).lnk\thttps://wixtoolset.org\t0\t[#Package.ico.047730A5_30FE_4A62_A520_DA9381B8226A]\t0",
}, results.OrderBy(s => s).ToArray());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -720,15 +720,9 @@ private void AddIniFileSymbol(IniFileSymbol symbol)

private void AddIniLocatorSymbol(IniLocatorSymbol symbol)
{
var name = symbol.FileName;
if (null == symbol.ShortFileName && null != name && !this.BackendHelper.IsValidShortFilename(name, false))
{
symbol.ShortFileName = this.CreateShortName(name, true, "IniFileSearch");
}

var row = this.CreateRow(symbol, "IniLocator");
row[0] = symbol.Id.Id;
row[1] = CreateMsiFilename(symbol.ShortFileName, name);
row[1] = CreateMsiFilename(symbol.ShortFileName, symbol.FileName);
row[2] = symbol.Section;
row[3] = symbol.Key;
row[4] = symbol.Field;
Expand Down Expand Up @@ -843,12 +837,6 @@ private void AddPropertySymbol(PropertySymbol symbol)

private void AddRemoveFileSymbol(RemoveFileSymbol symbol)
{
var name = symbol.FileName;
if (null == symbol.ShortFileName && null != name && !this.BackendHelper.IsValidShortFilename(name, false))
{
symbol.ShortFileName = this.CreateShortName(name, true, "RemoveFile", symbol.ComponentRef);
}

var installMode = symbol.OnInstall == true ? WindowsInstallerConstants.MsidbRemoveFileInstallModeOnInstall : 0;
installMode |= symbol.OnUninstall == true ? WindowsInstallerConstants.MsidbRemoveFileInstallModeOnRemove : 0;

Expand Down

0 comments on commit b9c31e2

Please sign in to comment.