Add user data directory support for ProjectSettings::globalize_path
This commit is contained in:
parent
d1cb73b47a
commit
20442d0a89
1 changed files with 9 additions and 1 deletions
|
@ -114,7 +114,15 @@ String ProjectSettings::globalize_path(const String &p_path) const {
|
||||||
return p_path.replace("res:/", resource_path);
|
return p_path.replace("res:/", resource_path);
|
||||||
};
|
};
|
||||||
return p_path.replace("res://", "");
|
return p_path.replace("res://", "");
|
||||||
};
|
} else if (p_path.begins_with("user://")) {
|
||||||
|
|
||||||
|
String data_dir = OS::get_singleton()->get_data_dir();
|
||||||
|
if (data_dir != "") {
|
||||||
|
|
||||||
|
return p_path.replace("user:/", data_dir);
|
||||||
|
};
|
||||||
|
return p_path.replace("user://", "");
|
||||||
|
}
|
||||||
|
|
||||||
return p_path;
|
return p_path;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue