RFR: 8294193: Files.createDirectories throws FileAlreadyExistsException for a symbolic link whose target is an existing directory [v3]
Jaikiran Pai
jpai at openjdk.org
Sat Sep 24 06:11:21 UTC 2022
> Can I please get a review of this change which proposes to fix the issue noted in https://bugs.openjdk.org/browse/JDK-8294193?
>
> As discussed in a related PR https://github.com/openjdk/jdk/pull/10266#issuecomment-1246800456, this is a genuine bug in the `java.nio.file.Files.createDirectories` implementation. The commit in this PR fixes that by making sure that links are followed when checking if a `Path` is a directory during the creation of directories in the `createDirectories` implementation. The `private` method which is changed in this PR is only used in the `Files.createDirectories` and no other place, so this change should not impact any other code. Additionally a new test has been added to reproduce the issue and verify the fix.
> tier1, tier2 and tier3 tests passed with this change.
Jaikiran Pai has updated the pull request incrementally with one additional commit since the last revision:
review comments for test
-------------
Changes:
- all: https://git.openjdk.org/jdk/pull/10383/files
- new: https://git.openjdk.org/jdk/pull/10383/files/e918d33c..350b3f87
Webrevs:
- full: https://webrevs.openjdk.org/?repo=jdk&pr=10383&range=02
- incr: https://webrevs.openjdk.org/?repo=jdk&pr=10383&range=01-02
Stats: 14 lines in 1 file changed: 2 ins; 1 del; 11 mod
Patch: https://git.openjdk.org/jdk/pull/10383.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/10383/head:pull/10383
PR: https://git.openjdk.org/jdk/pull/10383
More information about the nio-dev
mailing list