[Haskell-cafe] RE: ANN: System.FilePath 0.9

Andrew Pimlott andrew at pimlott.net
Wed Jul 26 19:02:31 EDT 2006

On Wed, Jul 26, 2006 at 10:32:02PM +0100, Neil Mitchell wrote:
> >Sorry, I meant to say what I think wget should do.  IMO, it should have
> >a conservative set of allowed characters, encode the filename into that
> Not enough, because of the LPT1 issue - unless you add L as a
> disallowed letter :)

hahaha!  I admit I don't know enough to say how the lpt1 issue should be
handled.  Is there any Win32 call I can make that will help me avoid
accidentally opening these magic files?  Say, if I call open with
O_CREAT | O_EXCL?  Unfortunately, I can find very little information on
how one should handle this issue.  BTW, it appears that wget itself does
not handle it. :-)

Incidentally, there seems to be another problem:  The System.IO API
provides no way to create a file, failing if it already exists (ie,
O_CREAT | O_EXCL).  This is exactly what wget needs.

BTW, I guess wget should truncate the path at some number of

> Having some considerations towards a real path, one that can be used
> on the command is reasonable

That's a great goal, it's just that we have to draw the boundary
somewhere.  At some point, you have be explicit that this is a path for
rsync or Emacs or whatever.


More information about the Haskell-Cafe mailing list