Encode POSIX file path to URI using u3 (file:///)

Ref https://github.com/sbt/io/pull/96

Under RFC 8089, both u1 and u3 are legal, but many of the other platforms expect traditional u3.
This will increase the compatibility/usability of sbt server, for example to integrate with Vim.
This commit is contained in:
Eugene Yokota
2017-12-12 16:27:14 +00:00
committed by Dale Wijnand
parent 7a8c89effc
commit 06b85919ba
4 changed files with 8 additions and 6 deletions
@@ -174,7 +174,7 @@ private[sbt] object Server {
auth match {
case _ if auth(ServerAuthentication.Token) =>
writeTokenfile()
PortFile(uri, Option(tokenfile.toString), Option(tokenfile.toURI.toString))
PortFile(uri, Option(tokenfile.toString), Option(IO.toURI(tokenfile).toString))
case _ =>
PortFile(uri, None, None)
}