RFR: 8317687: (fs) FileStore.supportsFileAttributeView("posix") incorrectly returns 'true' for FAT32 volume on macOS
Alan Bateman
alanb at openjdk.org
Sat Oct 7 06:25:56 UTC 2023
On Fri, 6 Oct 2023 21:39:32 GMT, Brian Burkhalter <bpb at openjdk.org> wrote:
> Change `BsdFileStore.supportsFileAttributeView` to return false for POSIX attributes when the associated volume file system type is FAT32.
src/java.base/macosx/classes/sun/nio/fs/BsdFileStore.java line 107:
> 105: if (type == PosixFileAttributeView.class &&
> 106: entry().fstype().equals("msdos"))
> 107: return false;
I suspect supportsFileAttributeView(String) will need to be changed to return false if the view name is "unix".
test/jdk/java/nio/file/Files/CopyAndMove.java line 158:
> 156: attrs1.fileKey(), attrs1.lastModifiedTime());
> 157: System.err.format("File time for %s is %s\n",
> 158: attrs2.fileKey(), attrs2.lastModifiedTime());
Are you 150% sure this is reliable?
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/16084#discussion_r1349471509
PR Review Comment: https://git.openjdk.org/jdk/pull/16084#discussion_r1349471986
More information about the nio-dev
mailing list