[Mono-list] bug: System.IO.FileStream

Miguel de Icaza miguel@ximian.com
03 Oct 2002 13:21:49 -0400


> Note, that I'm opening _directory_ with IO.FileStream. This is not allowed by specs, but current implementaion allows it. It fails later in Text.Encoding (do not know why there? - not reached in regular files - maybe this could be looked into as well)

In Unix it is valid to open a directory.  On some Unix systems you can
read the directory from the handle you obtained, in some others you

> Solution is to patch IO.FileStream's ctor to throws UnauthorizedAccessException when opening directory as described in MS docs.


> BTW2: --trace is great facility! Maybe this should be extended to produce customizable output or even xml files. It could be better than debugger in some cases. [eg. --trace:nojit,xml] [or integrate to debugger?] [profiling info?]

Yes, it would be nice to have more features in the tracer.