RFR: 8315273: (fs) Path.toRealPath(LinkOption.NOFOLLOW_LINKS) fails when "../../" follows a link (win) [v6]
Brian Burkhalter
bpb at openjdk.org
Mon Sep 16 23:52:13 UTC 2024
On Fri, 13 Sep 2024 19:42:27 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
>> Windows implementation of integrated pull request #15397. The test java/nio/file/Path/ToRealPath.java is also removed from the problem list.
>
> Brian Burkhalter has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains nine commits:
>
> - 8315273: Revert source changes; update test to match reality; correct a small type in Files
> - Merge
> - 8315273: Re-remove ToRealPath test
> - Merge
> - 8315273: Revert ProblemList
> - Merge
> - Merge
> - 8315273: Add bug ID to test
> - 8315273: (fs) Path.toRealPath(LinkOption.NOFOLLOW_LINKS) fails when "../../" follows a link (win)
In `C:\Users\bpb\dev\bugs`, create `dir`, `dir\subdir`, and `link -> dir\subdir`. Then running a simple native test using `CreateFileW` to create a new file `C:\Users\bpb\dev\bugs\link..\file.txt` actually creates `C:\Users\bpb\dev\bugs\file.txt`, which corroborates the conclusion of this PR. The initial version of this PR incorrectly expected that `file.txt` would be `C:\Users\bpb\dev\bugs\dir\file.txt`.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/15525#issuecomment-2354225541
More information about the nio-dev
mailing list