[Mono-dev] Blank characters in windows file names

Boris Kirzner borisk at mainsoft.com
Mon Feb 19 07:58:19 EST 2007

Hello all


Current implementation of System.IO file name handling avoids
platform-specific checks.


This causes any call on windows with file name containing blank
characters at the end to fail, while the same call passes in .Net (and
relates to the file name without blanks at the end).

Almost the same happens with calls to Path.GetFullPath()


The errors received is are either ArgumentException because of invalid
chars or "Win32 IO returned ERROR_INVALID_NAME" from Mono.IO



The attached patch (not final), is in the spirit of trimming blank chars
at the end of windows file names.

Does anybody think there is more elegant way to solve this?








-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070219/1776a804/attachment.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: blankchars.patch
Type: application/octet-stream
Size: 2624 bytes
Desc: blankchars.patch
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20070219/1776a804/attachment.obj 

More information about the Mono-devel-list mailing list