RFR: 8062795: (fs) Files.setPermissions requires read access when NOFOLLOW_LINKS specified [v3]
Brian Burkhalter
bpb at openjdk.org
Wed Aug 16 17:54:11 UTC 2023
On Wed, 16 Aug 2023 08:16:34 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8062795: Open the path with write access instead of checking for links
>
> src/java.base/unix/classes/sun/nio/fs/UnixFileAttributeViews.java line 284:
>
>> 282: fd = open(file, O_RDONLY, O_NOFOLLOW);
>> 283: } catch (UnixException e1) {
>> 284: if (e1.errno() == EACCES) {
>
> Maybe we should add a comment like "// retry with write access in case there is no read permission" ?
Comment added in 39b0754849d52f5f22e6cc3fb0b48605d58d7f17.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/15214#discussion_r1296250021
More information about the nio-dev
mailing list