From 3fa943fe2320f28fd6c7a6910f27cf9c91f41e46 Mon Sep 17 00:00:00 2001 From: Lamia Date: Sun, 24 Jul 2022 21:42:32 +1000 Subject: [PATCH] LSP: Sanitizes protocol URI `file:///c%3A` in file path Fixes #63205. --- modules/gdscript/language_server/gdscript_workspace.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/modules/gdscript/language_server/gdscript_workspace.cpp b/modules/gdscript/language_server/gdscript_workspace.cpp index 8d484a43b30..959651c0245 100644 --- a/modules/gdscript/language_server/gdscript_workspace.cpp +++ b/modules/gdscript/language_server/gdscript_workspace.cpp @@ -499,7 +499,9 @@ Error GDScriptWorkspace::parse_local_script(const String &p_path) { String GDScriptWorkspace::get_file_path(const String &p_uri) const { String path = p_uri; - path = path.replace(root_uri + "/", "res://"); + path = path.replace("///", "//"); + path = path.replace("%3A", ":"); + path = path.replacen(root_uri + "/", "res://"); path = path.uri_decode(); return path; }