#4968: openTempFile fails on Windows if a directory exists with the file name it
tries
-------------------------------+--------------------------------------------
    Reporter:  ganesh          |       Owner:  pcapriotti                 
        Type:  bug             |      Status:  patch                      
    Priority:  high            |   Milestone:  7.4.2                      
   Component:  libraries/base  |     Version:  7.0.1                      
    Keywords:                  |          Os:  Windows                    
Architecture:  x86_64 (amd64)  |     Failure:  Incorrect result at runtime
  Difficulty:  Unknown         |    Testcase:                             
   Blockedby:                  |    Blocking:                             
     Related:                  |  
-------------------------------+--------------------------------------------

Comment(by simonmar):

 The real problem seems to be that we're using `_open` from the CRT, which
 returns `EACCESS` when opening a directory.  In fact, `System.IO.openFile`
 is behaving incorrectly on Windows when asked to open a file.

 If we used the proper Win32 API we'd be able to handle this more cleanly,
 but that requires a rewrite of the IO layer on Windows.

 I'm ok with the proposed patch as a temporary workaround.

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4968#comment:11>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
Glasgow-haskell-bugs@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to