[GHC] #9044: createDirectoryIfMissing does not fail on unwritable parent dir

GHC ghc-devs at haskell.org
Sun Apr 27 23:22:34 UTC 2014


#9044: createDirectoryIfMissing does not fail on unwritable parent dir
-------------------------------------+-------------------------------------
       Reporter:  duncan             |             Owner:
           Type:  bug                |            Status:  new
       Priority:  normal             |         Milestone:
      Component:                     |           Version:  7.8.2
  libraries/directory                |  Operating System:  MacOS X
       Keywords:                     |   Type of failure:  Incorrect result
   Architecture:  Unknown/Multiple   |  at runtime
     Difficulty:  Unknown            |         Test Case:
     Blocked By:                     |          Blocking:
Related Tickets:                     |
-------------------------------------+-------------------------------------
 On OSX, using `createDirectoryIfMissing` to create a new directory inside
 a directory for which we do not have write permissions does not throw any
 exception. Of course it should throw an exception, as it does under Linux.

 {{{
 $ mkdir unwritable
 $ chmod ugo-w unwritable
 $ ghci
 > System.Directory.createDirectoryIfMissing True "unwritable/tst"
 >
 }}}

 On OSX (10.9.2) this does not fail. Under Linux (albeit with 7.6.3) this
 does throw an exception as expected:
 {{{
 *** Exception: unwritable/tst: createDirectory: permission denied
 (Permission denied)
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/9044>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list