diff options
Diffstat (limited to 'zenstore')
| -rw-r--r-- | zenstore/filecas.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/zenstore/filecas.cpp b/zenstore/filecas.cpp index 0011ddec6..1e9b50e63 100644 --- a/zenstore/filecas.cpp +++ b/zenstore/filecas.cpp @@ -63,8 +63,11 @@ FileCasStrategy::MakeShardedPath(WideStringBuilderBase& ShardedPath, const IoHas CasStore::InsertResult FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash) { + // File-based chunks have special case handling whereby we move the file into + // place in the file store directory, thus avoiding unnecessary copying + IoBufferFileReference FileRef; - if (Chunk.GetFileReference(/* out */ FileRef)) + if (Chunk.IsWholeFile() && Chunk.GetFileReference(/* out */ FileRef)) { size_t Shard2len = 0; ExtendableWideStringBuilder<128> ShardedPath; |