You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-08 12:40:44 +00:00
fix: modifies workspace->root_uri so that p_uri is symmetrical to other operating systems. #63388
This commit is contained in:
@@ -184,7 +184,9 @@ Dictionary GDScriptLanguageProtocol::initialize(const Dictionary &p_params) {
|
|||||||
if (root_uri.length() && is_same_workspace) {
|
if (root_uri.length() && is_same_workspace) {
|
||||||
workspace->root_uri = root_uri;
|
workspace->root_uri = root_uri;
|
||||||
} else {
|
} 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;
|
Dictionary params;
|
||||||
params["path"] = workspace->root;
|
params["path"] = workspace->root;
|
||||||
|
|||||||
@@ -500,10 +500,8 @@ Error GDScriptWorkspace::parse_local_script(const String &p_path) {
|
|||||||
|
|
||||||
String GDScriptWorkspace::get_file_path(const String &p_uri) const {
|
String GDScriptWorkspace::get_file_path(const String &p_uri) const {
|
||||||
String path = p_uri;
|
String path = p_uri;
|
||||||
path = path.replace("///", "//");
|
|
||||||
path = path.replace("%3A", ":");
|
|
||||||
path = path.replacen(root_uri + "/", "res://");
|
|
||||||
path = path.uri_decode();
|
path = path.uri_decode();
|
||||||
|
path = path.replacen(root_uri + "/", "res://");
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user