Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8317687

(fs) FileStore.supportsFileAttributeView("posix") incorrectly returns 'true' for FAT32 volume on macOS

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P4
    • 22
    • 21
    • core-libs
    • b20
    • os_x

    Description

      Checking the FileStore for a FAT32 USB volume gave different results on the principal OSes:

      Linux:
      jshell> Path p = Path.of("/media/bpb/KINGSTON")
      p ==> /media/bpb/KINGSTON

      jshell> Files.getFileStore(p).type()
      $2 ==> "vfat"

      jshell> Files.getFileStore(p).supportsFileAttributeView("posix")
      $3 ==> false

      macOS:
      jshell> Path p = Path.of("/Volumes/KINGSTON")
      p ==> /Volumes/KINGSTON

      jshell> Files.getFileStore(p).type()
      $2 ==> "msdos"

      jshell> Files.getFileStore(p).supportsFileAttributeView("posix")
      $3 ==> true

      Windows:
      jshell> Path p = Path.of("D:\\work")
      p ==> D:\work

      jshell> Files.getFileStore(p).type()
      $6 ==> "FAT32"

      jshell> Files.getFileStore(p).supportsFileAttributeView("posix")
      $7 ==> false

      In particular, on macOS the volume is indicated as supporting POSIX attributes which is false.

      Attachments

        Issue Links

          Activity

            People

              bpb Brian Burkhalter
              bpb Brian Burkhalter
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: