Skip to content

Commit 520a234

Browse files
committed
Fix space replacement
1 parent dbd4255 commit 520a234

File tree

1 file changed

+1
-1
lines changed
  • shared/src/main/kotlin/org/javacs/kt/util

1 file changed

+1
-1
lines changed

shared/src/main/kotlin/org/javacs/kt/util/URIs.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ import java.nio.file.Paths
1212
* (including VSCode) invalidly percent-encode colons.
1313
*/
1414
fun parseURI(uri: String): URI =
15-
URI.create(runCatching { URLDecoder.decode(uri.replace(" ", "%20"), StandardCharsets.UTF_8.toString()) }.getOrDefault(uri))
15+
URI.create(runCatching { URLDecoder.decode(uri, StandardCharsets.UTF_8.toString()).replace(" ", "%20") }.getOrDefault(uri))
1616

1717
val URI.filePath: Path? get() = runCatching { Paths.get(this) }.getOrNull()
1818

0 commit comments

Comments
 (0)