FileObject.toUri produces unusable URI for UNC paths

XMLWordPrintable

    • x86
    • windows_xp

      When an annotation processor is working with a file - say, a resource found in the source location - and calls FileObject.toUri on it, normally (assuming #6419926 is fixed) a file:/... URI is returned which can then be used to refer to that resource, say by passing it to an XML parser.

      When however the source tree is located on a Windows UNC share (\\server\share\path\...), the returned URI is of the form

        file:////server/share/path/...

      This has well-known problems documented in #4723726; namely, the normalized form is

        file:/server/share/path/...

      which translates to a different (likely nonexistent) file path.

      The desired form is that specified by Microsoft:

        file://server/share/path/...

      (Of course other code such as XML parsers then needs to handle proper UNC URIs as well, but that is outside the scope of the compiler.)

            Assignee:
            Jonathan Gibbons
            Reporter:
            Jesse Glick (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: