Skip to content

Commit

Permalink
Merge pull request #52513 from Ev1lbl0w/fix_path_double_slash
Browse files Browse the repository at this point in the history
Fix path with multiple slashes not being corrected on templates
  • Loading branch information
akien-mga authored Sep 20, 2021
2 parents e154820 + eef0327 commit 0068247
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions core/config/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,7 @@ String ProjectSettings::get_resource_path() const {
const String ProjectSettings::IMPORTED_FILES_PATH("res://.godot/imported");

String ProjectSettings::localize_path(const String &p_path) const {
if (resource_path == "") {
return p_path; //not initialized yet
}

if (p_path.begins_with("res://") || p_path.begins_with("user://") ||
if (resource_path.is_empty() || p_path.begins_with("res://") || p_path.begins_with("user://") ||
(p_path.is_absolute_path() && !p_path.begins_with(resource_path))) {
return p_path.simplify_path();
}
Expand Down

0 comments on commit 0068247

Please sign in to comment.