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

(fs) UserDefinedFileAttributeView attribute name semantics under-specified

XMLWordPrintable

      The specs generally mentions attribute name as a string, does not give any restrictions on the format of this.

      And I see the spec mentions - "user.mimetype" in the example as attribute name https://download.java.net/java/early_access/jdk24/docs/api/java.base/java/nio/file/attribute/UserDefinedFileAttributeView.html#write(java.lang.String,java.nio.ByteBuffer)

      Some file systems expect the attribute name to start with 'user.' and contain only one such occurrence. This causes issues if the client sets the user attribute as 'user.value', because 'UnixUserDefinedFileAttributeView' prefixes the namespace 'user.' without checking if such a prefix is already present in the attribute name, resulting in 'user.user.value', which is rejected by some file systems.

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

              Created:
              Updated: