Skip to content

Commit 08c9318

Browse files
committed
make sure to set it in non-raw loadfile too
1 parent b503913 commit 08c9318

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/resource/archive/ArchiveManager.cpp

+4-7
Original file line numberDiff line numberDiff line change
@@ -45,12 +45,7 @@ std::shared_ptr<File> ArchiveManager::LoadFile(const std::string& filePath) {
4545
return nullptr;
4646
}
4747

48-
const auto archive = mFileToArchive[CRC64(filePath.c_str())];
49-
if (archive == nullptr) {
50-
return nullptr;
51-
}
52-
53-
return archive->LoadFile(filePath);
48+
return LoadFile(CRC64(filePath.c_str()));
5449
}
5550

5651
std::shared_ptr<File> ArchiveManager::LoadFile(uint64_t hash) {
@@ -59,7 +54,9 @@ std::shared_ptr<File> ArchiveManager::LoadFile(uint64_t hash) {
5954
return nullptr;
6055
}
6156

62-
return archive->LoadFile(hash);
57+
auto file = archive->LoadFile(hash);
58+
file->Parent = archive;
59+
return file;
6360
}
6461

6562
std::shared_ptr<File> ArchiveManager::LoadFileRaw(const std::string& filePath) {

0 commit comments

Comments
 (0)