aboutsummaryrefslogtreecommitdiff
path: root/zenstore/cidstore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-11-18 11:35:13 +0100
committerGitHub <[email protected]>2022-11-18 02:35:13 -0800
commit55225621f018904abf7e212320bb784dc64f8ac3 (patch)
tree3fb962e9e0553448f9d42612bb078ff072308e1c /zenstore/cidstore.cpp
parentmove BasicFile to zenutil to remove zenstore dependency from zen command (#190) (diff)
downloadzen-55225621f018904abf7e212320bb784dc64f8ac3.tar.xz
zen-55225621f018904abf7e212320bb784dc64f8ac3.zip
Add `import-project` and `export-project` (#183)
* Add `import-project` and `export-project` command line parsing
Diffstat (limited to 'zenstore/cidstore.cpp')
-rw-r--r--zenstore/cidstore.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/zenstore/cidstore.cpp b/zenstore/cidstore.cpp
index 5a079dbed..8b2797ce9 100644
--- a/zenstore/cidstore.cpp
+++ b/zenstore/cidstore.cpp
@@ -23,14 +23,14 @@ struct CidStore::Impl
void Initialize(const CidStoreConfiguration& Config) { m_CasStore.Initialize(Config); }
- CidStore::InsertResult AddChunk(const CompressedBuffer& ChunkData)
+ CidStore::InsertResult AddChunk(const CompressedBuffer& ChunkData, CidStore::InsertMode Mode)
{
const IoHash DecompressedId = IoHash::FromBLAKE3(ChunkData.GetRawHash());
IoBuffer Payload = ChunkData.GetCompressed().Flatten().AsIoBuffer();
Payload.SetContentType(ZenContentType::kCompressedBinary);
- CasStore::InsertResult Result = m_CasStore.InsertChunk(Payload, DecompressedId);
+ CasStore::InsertResult Result = m_CasStore.InsertChunk(Payload, DecompressedId, static_cast<CasStore::InsertMode>(Mode));
return {.New = Result.New};
}
@@ -78,9 +78,9 @@ CidStore::Initialize(const CidStoreConfiguration& Config)
}
CidStore::InsertResult
-CidStore::AddChunk(const CompressedBuffer& ChunkData)
+CidStore::AddChunk(const CompressedBuffer& ChunkData, InsertMode Mode)
{
- return m_Impl->AddChunk(ChunkData);
+ return m_Impl->AddChunk(ChunkData, Mode);
}
IoBuffer