Skip to content

Commit

Permalink
Fix path with multiple slashes not being corrected on templates
Browse files Browse the repository at this point in the history
  • Loading branch information
rsubtil committed Sep 10, 2021
1 parent 3174e27 commit eef0327
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 eef0327

Please sign in to comment.