From 723ad5ef6140b5dede22ab764b4646030e5029ee Mon Sep 17 00:00:00 2001 From: Ricardo Subtil Date: Thu, 9 Sep 2021 15:48:37 +0100 Subject: [PATCH] Fix path with multiple slashes not being corrected on templates (cherry picked from commit eef0327d1e1a19429157709fc15593a067b0f803) --- core/project_settings.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 540157d6e1f..1d381cdbab0 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -54,11 +54,7 @@ String ProjectSettings::get_resource_path() const { }; 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.empty() || p_path.begins_with("res://") || p_path.begins_with("user://") || (p_path.is_abs_path() && !p_path.begins_with(resource_path))) { return p_path.simplify_path(); }