[GHC] #1874: getDirectoryContents yields "invalid argument" instead
of "permission error"
GHC
trac at galois.com
Mon Nov 12 05:49:49 EST 2007
#1874: getDirectoryContents yields "invalid argument" instead of "permission
error"
------------------------------------------------------------------+---------
Reporter: Orphi | Owner:
Type: bug | Status: new
Priority: normal | Milestone:
Component: libraries (other) | Version: 6.8.1
Severity: normal | Keywords:
Testcase: getDirectoryContents "C:\\System Volume Information" | Architecture: x86
Os: Windows |
------------------------------------------------------------------+---------
Attempting to open a file (`readFile`, `openFile`, et al) to which you do
not have permission yields a permission exception. However, calling
`getDirectoryContents` on a folder to which you do not have permission
yields an "invalid argument" exception.
(Note that as per bug #1868, this particular exception is very hard to
process.)
This behaviour occurs in GHC 6.6.1 and GHC 6.8.1 running on Windows XP. (I
think I recall it also happening in GHC 6.6 on Windows NT as well, but I
might be imagining that part.)
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/1874>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list