diff options
author | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-03-30 12:49:52 +0100 |
---|---|---|
committer | A Thousand Ships <96648715+AThousandShips@users.noreply.github.com> | 2024-03-30 12:50:08 +0100 |
commit | 0274877defb9c5d325e028f50353da037a115553 (patch) | |
tree | 0669504d556c9e793057833360341a72d97720f4 /core/io/resource_loader.cpp | |
parent | 86415f02452dbf6de85325d3321fd7ec7fba9e94 (diff) | |
download | redot-engine-0274877defb9c5d325e028f50353da037a115553.tar.gz |
[Core] Fix `ResourceLoader.load` cache with relative paths
Paths were not simplified meaning that `res://foo.bar` was treated
differently from `./foo.bar` and similar
Diffstat (limited to 'core/io/resource_loader.cpp')
-rw-r--r-- | core/io/resource_loader.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/resource_loader.cpp b/core/io/resource_loader.cpp index ff563a35b2..191abee315 100644 --- a/core/io/resource_loader.cpp +++ b/core/io/resource_loader.cpp @@ -402,7 +402,7 @@ static String _validate_local_path(const String &p_path) { if (uid != ResourceUID::INVALID_ID) { return ResourceUID::get_singleton()->get_id_path(uid); } else if (p_path.is_relative_path()) { - return "res://" + p_path; + return ("res://" + p_path).simplify_path(); } else { return ProjectSettings::get_singleton()->localize_path(p_path); } |