소스 검색

Merge pull request #99165 from bruvzg/fix_has_path

Fix `PackedData::has_path()` using wrong path format.
Rémi Verschelde 11 달 전
부모
커밋
277cb68e1a
1개의 변경된 파일1개의 추가작업 그리고 1개의 파일을 삭제
  1. 1 1
      core/io/file_access_pack.h

+ 1 - 1
core/io/file_access_pack.h

@@ -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) {