From d160d717969bfcaf0f1dd17de9e8c9ec54a6db0b Mon Sep 17 00:00:00 2001 From: Mikael Hermansson Date: Wed, 11 Jun 2025 12:43:32 +0200 Subject: [PATCH] Stop `FileAccess::fix_path` from emitting errors for invalid UIDs --- core/io/file_access.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/core/io/file_access.cpp b/core/io/file_access.cpp index 17e0293e4e2..9d1fdedc503 100644 --- a/core/io/file_access.cpp +++ b/core/io/file_access.cpp @@ -258,7 +258,12 @@ String FileAccess::fix_path(const String &p_path) const { case ACCESS_RESOURCES: { if (ProjectSettings::get_singleton()) { if (r_path.begins_with("uid://")) { - r_path = ResourceUID::uid_to_path(r_path); + ResourceUID::ID uid = ResourceUID::get_singleton()->text_to_id(r_path); + if (ResourceUID::get_singleton()->has_id(uid)) { + r_path = ResourceUID::get_singleton()->get_id_path(uid); + } else { + r_path.clear(); + } } if (r_path.begins_with("res://")) {