Ticket #1874 (closed bug: fixed)
getDirectoryContents yields "invalid argument" instead of "permission error"
| Reported by: | Orphi | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | _|_ |
| Component: | libraries/directory | Version: | 6.8.1 |
| Keywords: | Cc: | fryguybob@… | |
| Operating System: | Windows | Architecture: | x86 |
| Type of failure: | None/Unknown | Difficulty: | Moderate (less than a day) |
| Test Case: | getDirectoryContents "C:\\System Volume Information" | Blocked By: | |
| Blocking: | Related Tickets: |
Description
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.)
Change History
Note: See
TracTickets for help on using
tickets.
