--- a/src/Pure/General/url.scala Tue Jan 03 17:33:08 2017 +0100
+++ b/src/Pure/General/url.scala Tue Jan 03 19:22:17 2017 +0100
@@ -81,8 +81,6 @@
if (name.startsWith("file://")) name
else {
val s = name.replaceAll(" ", "%20")
- if (!Platform.is_windows) "file://" + s
- else if (s.startsWith("\\\\")) "file:" + s.replace('\\', '/')
- else "file:///" + s.replace('\\', '/')
+ "file://" + (if (Platform.is_windows) s.replace('\\', '/') else s)
}
}
--- a/src/Tools/VSCode/src/vscode_resources.scala Tue Jan 03 17:33:08 2017 +0100
+++ b/src/Tools/VSCode/src/vscode_resources.scala Tue Jan 03 19:22:17 2017 +0100
@@ -50,8 +50,8 @@
override def append(dir: String, source_path: Path): String =
{
val path = source_path.expand
- if (path.is_absolute) "file://" + path.implode
- else if (dir == "") "file://" + (File.pwd() + path).implode
+ if (path.is_absolute) Url.platform_file(path)
+ else if (dir == "") Url.platform_file(File.pwd() + path)
else if (path.is_current) dir
else Url.normalize_file(dir + "/" + path.implode)
}