id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
4199,createDirectoryIfMissing fails if directory exists on 32-bit windows,creswick,,"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).",bug,closed,high,7.0.1,libraries/directory,6.12.1,worksforme,,,Windows,x86,Runtime crash,,,,,
