[GHC] #1874: getDirectoryContents yields "invalid argument"
instead of "permission error"
GHC
trac at galois.com
Tue May 6 09:44:58 EDT 2008
#1874: getDirectoryContents yields "invalid argument" instead of "permission
error"
------------------------------------------------------------------+---------
Reporter: Orphi | Owner:
Type: bug | Status: new
Priority: lowest | Milestone: 6.8.3
Component: libraries/directory | Version: 6.8.1
Severity: normal | Resolution:
Keywords: | Difficulty: Easy (1 hr)
Testcase: getDirectoryContents "C:\\System Volume Information" | Architecture: x86
Os: Windows |
------------------------------------------------------------------+---------
Comment (by Deewiant):
What version of Windows are you using? This is on Windows XP Professional
with Service Pack 2:
{{{
$ cat asdf.hs
module Main (main) where
import Control.Exception
import Prelude hiding (catch)
import System.Directory
main :: IO ()
main = do
(getDirectoryContents "D:\\Main\\npd" >> return ()) `catch`
print
putStrLn "Foo"
}}}
{{{
$ ls -ld npd
d---------+ 2 Deewiant None 0 May 6 16:34 npd
}}}
{{{
$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.8.2
}}}
{{{
$ ghc --make -fforce-recomp asdf
[1 of 1] Compiling Main ( asdf.hs, asdf.o )
Linking asdf.exe ...
}}}
{{{
$ ./asdf.exe
D:\Main\npd: getDirectoryContents: invalid argument (Invalid argument)
Foo
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1874#comment:5>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list