JDK-8032220 : Files.createDirectories throws exception with confusing message for root directories that exist
  • Type: Bug
  • Component: core-libs
  • Sub-Component: java.nio
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-01-18
  • Updated: 2025-07-22
  • Resolved: 2014-01-21
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 8 JDK 9
8u20Fixed 9 b02Fixed
Related Reports
Relates :  
Description
This issue came up on nio-discuss:
  http://mail.openjdk.java.net/pipermail/nio-discuss/2014-January/000710.html

On OS X it appears to be caused by the underlying mkdir failing with EISADIR and this not translated into a FileAlreadyExistsException.

On Windows it appears to be caused by the underlying CreateDIrectory failing with an access denied error.

It does not appear to be an issue on Linux.
Comments
URL: http://hg.openjdk.java.net/jdk9/jdk9/jdk/rev/8ff79b0e3503 User: lana Date: 2014-01-28 05:50:56 +0000
28-01-2014

URL: http://hg.openjdk.java.net/jdk9/dev/jdk/rev/8ff79b0e3503 User: alanb Date: 2014-01-21 09:35:53 +0000
21-01-2014