summaryrefslogtreecommitdiffstats
path: root/modules/gdscript/language_server/gdscript_language_protocol.cpp
diff options
context:
space:
mode:
authorLamia <git@lamia.io>2022-08-08 20:02:31 +1000
committerLamia <git@lamia.io>2022-08-08 22:40:13 +1000
commit42a16ef76e4100c285a4a8c17f22a199986072a7 (patch)
tree0ed9d95bdf41f28275d31523d068ec61dbb58b8b /modules/gdscript/language_server/gdscript_language_protocol.cpp
parentc8cdc10902312e19fcdaa3a39755f783649d6c81 (diff)
downloadredot-engine-42a16ef76e4100c285a4a8c17f22a199986072a7.tar.gz
fix: modifies workspace->root_uri so that p_uri is symmetrical to other operating systems. #63388
Diffstat (limited to 'modules/gdscript/language_server/gdscript_language_protocol.cpp')
-rw-r--r--modules/gdscript/language_server/gdscript_language_protocol.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/gdscript/language_server/gdscript_language_protocol.cpp b/modules/gdscript/language_server/gdscript_language_protocol.cpp
index c0d5856be5..39f4c976a4 100644
--- a/modules/gdscript/language_server/gdscript_language_protocol.cpp
+++ b/modules/gdscript/language_server/gdscript_language_protocol.cpp
@@ -184,7 +184,9 @@ Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) {
if (root_uri.length() && is_same_workspace) {
workspace->root_uri = root_uri;
} else {
- workspace->root_uri = "file://" + workspace->root;
+ String r_root = workspace->root;
+ r_root = r_root.lstrip("/");
+ workspace->root_uri = "file:///" + r_root;
Dictionary params;
params["path"] = workspace->root;