createDirectoryIfMissing fails if directory exists on 32-bit windows
createDirectoryIfMissing generates an exception when running on 32-bit windows.
$ ./dirbug.exe "c:\\cygwin\\home\\hudson\\tmp\\dirBug\\foo"
dirbug.exe: CreateDirectory: invalid argument (Cannot create a file when that file already exists.)
I've verified this behavior with 32-bit vista with c and asm backends using ghc 6.12.1 and 6.10.4.
import System.Directory ( createDirectoryIfMissing )
--
-- 6.12.1 fails with:
-- $ ghc -fvia-c
-- $ ghc -fasm
--
-- 6.10.4 fails with:
-- $ ghc -fasm
-- $ ghc -fvia-c
main :: IO ()
main = do
createDirectoryIfMissing True "foo"
createDirectoryIfMissing True "foo"
This does *not* throw an exception on 64-bit vista, and this also does not throw an exception when running interpreted (either ghci or runhaskell).
Trac metadata
| Trac field | Value |
|---|---|
| Version | 6.12.1 |
| Type | Bug |
| TypeOfFailure | OtherFailure |
| Priority | normal |
| Resolution | Unresolved |
| Component | libraries/directory |
| Test case | |
| Differential revisions | |
| BlockedBy | |
| Related | |
| Blocking | |
| CC | |
| Operating system | |
| Architecture |