diff options
| author | Juan Linietsky | 2014-08-01 22:10:38 -0300 |
|---|---|---|
| committer | Juan Linietsky | 2014-08-01 22:10:38 -0300 |
| commit | 678948068bbde7f12a9c5f28a467b6cf4d127851 (patch) | |
| tree | 75572f3a5cc6089a6ca3046e9307d0a7c0b72c51 /core/io/file_access_pack.cpp | |
| parent | 9ff6d55822647c87eef392147ea15641d0922d47 (diff) | |
| download | godot-678948068bbde7f12a9c5f28a467b6cf4d127851.tar.gz godot-678948068bbde7f12a9c5f28a467b6cf4d127851.tar.zst godot-678948068bbde7f12a9c5f28a467b6cf4d127851.zip | |
Diffstat (limited to 'core/io/file_access_pack.cpp')
| -rw-r--r-- | core/io/file_access_pack.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/core/io/file_access_pack.cpp b/core/io/file_access_pack.cpp index e2cb300eb..6e03819aa 100644 --- a/core/io/file_access_pack.cpp +++ b/core/io/file_access_pack.cpp @@ -48,7 +48,10 @@ Error PackedData::add_pack(const String& p_path) { void PackedData::add_path(const String& pkg_path, const String& path, uint64_t ofs, uint64_t size,const uint8_t* p_md5, PackSource* p_src) { - bool exists = files.has(path); + PathMD5 pmd5(path.md5_buffer()); + //printf("adding path %ls, %lli, %lli\n", path.c_str(), pmd5.a, pmd5.b); + + bool exists = files.has(pmd5); PackedFile pf; pf.pack=pkg_path; @@ -58,7 +61,7 @@ void PackedData::add_path(const String& pkg_path, const String& path, uint64_t o pf.md5[i]=p_md5[i]; pf.src = p_src; - files[path]=pf; + files[pmd5]=pf; if (!exists) { //search for dir @@ -113,6 +116,8 @@ bool PackedSourcePCK::try_open_pack(const String& p_path) { if (!f) return false; + //printf("try open %ls!\n", p_path.c_str()); + uint32_t magic= f->get_32(); if (magic != 0x43504447) { |
