Menu

#1292 Unhandled exception for a File with a Name that contains unk

v3.0
closed
nobody
light (353)
2012-09-15
2008-08-01
jordanf
No

The character 'µ' gets replaced with a '?' in the File/@Name attribute, but this is not caught by Light as an invalid file name. Normally, the Compiler checks for an invalid file name, but 'µ' gets by that check and is later replaced with '?'.

Repro:

  1. Author a file element with a character from the non-default codepage, eg:

<Product Id=...
...
<file id="user-content-File1" name="µ.txt" source="c:\TextFile1.txt"></file>

  1. Compile

  2. Link

Expected: some type of error saying that 'µ' is not a recognized character in the default codepage and that it is being replaced with a '?' which is invalid in a file name.

Actual:

C:\test.wxs(15) : error LGHT0204 : ICE03: Invalid
Filename; Table: File, Column: FileName, Key(s): Test_txt1
light.exe : error LGHT0001 : Illegal characters in path.

Exception Type: System.ArgumentException

Stack Trace:
at System.Security.Permissions.FileIOPermission.HasIllegalCharacters(String[] str)
at System.Security.Permissions.FileIOPermission.AddPathList(FileIOPermissionAccess access, Access
ControlActions control, String[] pathListOrig, Boolean checkForDuplicates, Boolean needFullPath, Boo
lean copyPathList)
at System.Security.Permissions.FileIOPermission..ctor(FileIOPermissionAccess access, String[] pat
hList, Boolean checkForDuplicates, Boolean needFullPath)
at System.IO.Path.GetFullPath(String path)
at Microsoft.Tools.WindowsInstallerXml.Binder.ProcessUncompressedFiles(String tempDatabaseFile, F
ileRowCollection fileRows, ArrayList fileTransfers, MediaRowCollection mediaRows, String layoutDirec
tory, Boolean compressed, Boolean longNamesInImage)
at Microsoft.Tools.WindowsInstallerXml.Binder.BindDatabase(Output output, String databaseFile)
at Microsoft.Tools.WindowsInstallerXml.Binder.Bind(Output output, String file)
at Microsoft.Tools.WindowsInstallerXml.Tools.Light.Run(String[] args)
Binder temporary directory located at 'C:\Users\jordanf\AppData\Local\Temp\pz633rtx'.
Validator temporary directory located at 'C:\Users\jordanf\AppData\Local\Temp\ug099rbi'.

Discussion

  • jordanf

    jordanf - 2008-08-01

    sample authoring (create your own TextFile1.txt)

     
  • SourceForge Robot

    This Tracker item was closed automatically by the system. It was
    previously set to a Pending status, and the original submitter
    did not respond within 15 days (the time period specified by
    the administrator of this Tracker).

     
MongoDB Logo MongoDB