summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <remi@verschelde.fr>2021-09-20 13:00:29 +0200
committerGitHub <noreply@github.com>2021-09-20 13:00:29 +0200
commit0068247ab68c18653c986358b6949f80c5f10b24 (patch)
tree4d85ac012ad5d668aebd6029c27f6c08d62e7e91
parente154820935fbbb20615148f05ad2d29963aedddc (diff)
parenteef0327d1e1a19429157709fc15593a067b0f803 (diff)
Merge pull request #52513 from Ev1lbl0w/fix_path_double_slash
Fix path with multiple slashes not being corrected on templates
-rw-r--r--core/config/project_settings.cpp6
1 files changed, 1 insertions, 5 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp
index 03892d1d4f..09f9f84728 100644
--- a/core/config/project_settings.cpp
+++ b/core/config/project_settings.cpp
@@ -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();
}