getDirectoryContents yields "invalid argument" instead of "permission error"
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 (closed), 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.)
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.8.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries (other) |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |