RFR: 8364277: (fs) BasicFileAttributes.isDirectory and isOther return true for NTFS directory junctions when links not followed [v3]
Brian Burkhalter
bpb at openjdk.org
Wed Aug 6 17:39:27 UTC 2025
On Wed, 6 Aug 2025 06:01:07 GMT, Alan Bateman <alanb at openjdk.org> wrote:
>> Brian Burkhalter has updated the pull request incrementally with one additional commit since the last revision:
>>
>> 8364277: Clean up per reviewer comments
>
> src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java line 419:
>
>> 417: return false;
>> 418: return ((fileAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0 &&
>> 419: (fileAttrs & FILE_ATTRIBUTE_REPARSE_POINT) != 0);
>
> Should this just check if reparseTag has the value IO_REPARSE_TAG_MOUNT_POINT?
So changed in 481bdbc.
> src/java.base/windows/classes/sun/nio/fs/WindowsFileAttributes.java line 436:
>
>> 434: if (isSymbolicLink())
>> 435: return false;
>> 436: return ((fileAttrs & FILE_ATTRIBUTE_DIRECTORY) != 0 &&
>
> I assume it means that isDirectory no longer needs to use isSymbolicLink as the change means it will return false for all files that are reparse points.
So changed in 481bdbc.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2257849276
PR Review Comment: https://git.openjdk.org/jdk/pull/26631#discussion_r2257849755
More information about the core-libs-dev
mailing list