According to RFC 3986 Section 3 if a URI contains :// then it must have an authority and an path-abempty. This means that at minimum it must either be scheme:// or scheme:///. Alternative, a URI may consist of a path without an authority wherein it is only prefixed by a scheme: and may not start with // thus guaranteeing that a scheme+path URI cannot be mistake for a scheme+authority+path URI. This is while file: scheme URLs have three slashes at the start, example: file:///path/to/local/filename.
The way MakeVFSPath is written, it either prefixes vfs:// to a relative path, or replaces the leading / of an absolute path with vfs://, both of which produce invalid URIs.
According to RFC 3986 Section 3 if a URI contains
://then it must have anauthorityand anpath-abempty. This means that at minimum it must either bescheme://orscheme:///. Alternative, a URI may consist of a path without an authority wherein it is only prefixed by ascheme:and may not start with//thus guaranteeing that a scheme+path URI cannot be mistake for a scheme+authority+path URI. This is whilefile:scheme URLs have three slashes at the start, example:file:///path/to/local/filename.The way MakeVFSPath is written, it either prefixes
vfs://to a relative path, or replaces the leading/of an absolute path withvfs://, both of which produce invalid URIs.