Opened 5 years ago

Closed 5 years ago

#9044 closed bug (fixed)

createDirectoryIfMissing does not fail on unwritable parent dir

Reported by: duncan Owned by: ekmett
Priority: normal Milestone:
Component: Core Libraries Version: 7.8.2
Keywords: Cc: core-libraries-committee@…
Operating System: MacOS X Architecture: Unknown/Multiple
Type of failure: Incorrect result at runtime Test Case:
Blocked By: Blocking:
Related Tickets: Differential Rev(s):
Wiki Page:


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)

Change History (3)

comment:1 Changed 5 years ago by thoughtpolice

Component: libraries/directoryCore Libraries
Owner: set to ekmett

Moving over to new owning component 'Core Libraries'.

comment:2 Changed 5 years ago by ekmett

Cc: core-libraries-committee@… added

comment:3 Changed 5 years ago by ekmett

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.