Skip to content

Commit

Permalink
[Core] Fix ResourceLoader.load cache with relative paths
Browse files Browse the repository at this point in the history
Paths were not simplified meaning that `res://foo.bar` was treated
differently from `./foo.bar` and similar
  • Loading branch information
AThousandShips committed Mar 30, 2024
1 parent 86415f0 commit 0274877
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion core/io/resource_loader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 0274877

Please sign in to comment.