Merge pull request #99165 from bruvzg/fix_has_path

Fix `PackedData::has_path()` using wrong path format.
This commit is contained in:
Rémi Verschelde 2024-11-13 12:34:27 +01:00 committed by GitHub
commit 277cb68e1a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -205,7 +205,7 @@ Ref<FileAccess> PackedData::try_open_path(const String &p_path) {
}
bool PackedData::has_path(const String &p_path) {
return files.has(PathMD5(p_path.simplify_path().md5_buffer()));
return files.has(PathMD5(p_path.simplify_path().trim_prefix("res://").md5_buffer()));
}
bool PackedData::has_directory(const String &p_path) {