finish manager split

This commit is contained in:
2023-09-06 10:42:23 +08:00
parent 2ec66131cf
commit a1acdf10c6
12 changed files with 146 additions and 82 deletions

View File

@ -3,6 +3,7 @@
#include "CKStateChunk.hpp"
#include "ObjImpls/CKObject.hpp"
#include "MgrImpls/CKBaseManager.hpp"
#include "MgrImpls/CKPathManager.hpp"
#include "../VxMath/VxMemoryMappedFile.hpp"
#include <memory>
@ -315,7 +316,7 @@ namespace LibCmo::CK2 {
std::fwrite(name_conv.data(), sizeof(char), filenamelen, fs);
// try mapping file.
std::string tempfilename = m_Ctx->GetTempFilePath(fentry.c_str());
std::string tempfilename = m_Ctx->GetPathManager()->GetTempFilePath(fentry.c_str());
std::unique_ptr<VxMath::VxMemoryMappedFile> mappedFile(new VxMath::VxMemoryMappedFile(tempfilename.c_str()));
if (mappedFile->IsValid()) {
// write file length