behaviour change in getDirectoryContents in GHC 7.2?

Max Bolingbroke batterseapower at
Wed Nov 2 10:37:22 CET 2011

On 1 November 2011 20:13, John Millikin <jmillikin at> wrote:
> $ ghci-7.2.1
> GHC> import System.Directory
> GHC> getDirectoryContents "path-test"
> ["\161\165","\61345\61349","..","."]
> GHC> readFile "path-test/\161\165"
> "world\n"
> GHC> readFile "path-test/\61345\61349"
> *** Exception: path-test/: openFile: does not exist (No such file or
> directory)

Thanks for the example! I can reproduce this on Linux (haven't tried
OS X or Windows) and AFAICT this behaviour is just a straight-up bug
and is *not* intended behaviour. I'm not sure why the tests aren't
catching it.

I'm looking into it now.


More information about the Glasgow-haskell-users mailing list