diff options
Diffstat (limited to 'zenserver')
| -rw-r--r-- | zenserver/projectstore.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/zenserver/projectstore.cpp b/zenserver/projectstore.cpp index cb6be69e8..dcad483a6 100644 --- a/zenserver/projectstore.cpp +++ b/zenserver/projectstore.cpp @@ -477,8 +477,8 @@ ProjectStore::Oplog::AppendNewOplogEntry(CbPackage OpPackage) for (const auto& Attach : Attachments) { - SharedBuffer BinaryView = Attach.AsBinaryView(); - m_CasStore.InsertChunk(BinaryView.GetData(), BinaryView.GetSize(), Attach.GetHash()); + IoBuffer AttachmentData = Attach.AsBinaryView().AsIoBuffer(); + m_CasStore.InsertChunk(AttachmentData, Attach.GetHash()); } return RegisterOplogEntry(Core, OpEntry, kUpdateNewEntry); @@ -1060,7 +1060,7 @@ HttpProjectService::HttpProjectService(CasStore& Store, ProjectStore* Projects) CbPackage::AttachmentResolver Resolver = [&](const IoHash& Hash) -> SharedBuffer { std::filesystem::path AttachmentPath = Log.TempPath() / Hash.ToHexString(); - if (IoBuffer Data = IoBufferBuilder::MakeFromFile(AttachmentPath.native().c_str())) + if (IoBuffer Data = IoBufferBuilder::MakeFromTemporaryFile(AttachmentPath.native().c_str())) { return SharedBuffer(std::move(Data)); } |