Directory.doesDirectoryExist inconsistency
Simon Peyton-Jones
simonpj at microsoft.com
Tue Oct 22 11:50:27 EDT 2002
Sigbjorn (and others interested in Win32 I/O behaviour)
The fact that MS CRT differs from Unix doesn't mean that the Haskell
interface should necessarily differ. The Haskell impl of
doesDirectoryExist could, on Win32, trim off trailing '/' or '\', in
order to make the behaviour consistent. Where it's possible to get
consistent behaviour, we should strive for that. Do you agree?
Simon
| -----Original Message-----
| From: Sigbjorn Finne [mailto:sof at galois.com]
| Sent: 16 October 2002 15:54
| To: Claus Reinke
| Cc: glasgow-haskell-bugs at haskell.org
| Subject: Re: Directory.doesDirectoryExist inconsistency
|
| This is known behaviour of the MS CRT implementation
| of stat() on directories -- trailing slashes will cause it to
| report ENOENT.
|
| Undesirable behaviour, you might (reasonably) say, but
| the format of FilePaths is left system-specific by Haskell98.
|
| --sigbjorn
|
| ----- Original Message -----
| From: "Claus Reinke" <claus.reinke at talk21.com>
| To: <glasgow-haskell-bugs at haskell.org>
| Sent: Wednesday, October 16, 2002 07:21
| Subject: Directory.doesDirectoryExist inconsistency
|
|
| > I've just been chasing a portability problem, where a largish
third-party
| > program works fine on our suns (ghc-5.02.3), but chokes under
| > cygwin/windows (ghc-5.04). Comes down to an inconsistency in the
| > handling of (trailing?) slashes in Directory.doesDirectoryExist (see
| > a and b below).
| >
| ...
|
| _______________________________________________
| Glasgow-haskell-bugs mailing list
| Glasgow-haskell-bugs at haskell.org
| http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs
More information about the Glasgow-haskell-bugs
mailing list