mirror of
https://github.com/godotengine/godot.git
synced 2024-10-23 21:51:35 +00:00
Merge pull request #52513 from Ev1lbl0w/fix_path_double_slash
Fix path with multiple slashes not being corrected on templates
This commit is contained in:
commit
0068247ab6
|
@ -55,11 +55,7 @@ String ProjectSettings::get_resource_path() const {
|
||||||
const String ProjectSettings::IMPORTED_FILES_PATH("res://.godot/imported");
|
const String ProjectSettings::IMPORTED_FILES_PATH("res://.godot/imported");
|
||||||
|
|
||||||
String ProjectSettings::localize_path(const String &p_path) const {
|
String ProjectSettings::localize_path(const String &p_path) const {
|
||||||
if (resource_path == "") {
|
if (resource_path.is_empty() || p_path.begins_with("res://") || p_path.begins_with("user://") ||
|
||||||
return p_path; //not initialized yet
|
|
||||||
}
|
|
||||||
|
|
||||||
if (p_path.begins_with("res://") || p_path.begins_with("user://") ||
|
|
||||||
(p_path.is_absolute_path() && !p_path.begins_with(resource_path))) {
|
(p_path.is_absolute_path() && !p_path.begins_with(resource_path))) {
|
||||||
return p_path.simplify_path();
|
return p_path.simplify_path();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user