diff options
Diffstat (limited to 'src/zenstore/filecas.cpp')
| -rw-r--r-- | src/zenstore/filecas.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/zenstore/filecas.cpp b/src/zenstore/filecas.cpp index 3a7a72ee3..b254d06ab 100644 --- a/src/zenstore/filecas.cpp +++ b/src/zenstore/filecas.cpp @@ -315,7 +315,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: // File-based chunks have special case handling whereby we move the file into // place in the file store directory, thus avoiding unnecessary copying - if (MoveToFile(ChunkPath, Chunk)) + if (std::error_code MoveEc = MoveToFile(ChunkPath, Chunk); !MoveEc) { bool IsNew = UpdateIndex(ChunkHash, Chunk.Size()); return CasStore::InsertResult{.New = IsNew}; @@ -337,7 +337,7 @@ FileCasStrategy::InsertChunk(IoBuffer Chunk, const IoHash& ChunkHash, CasStore:: if (Mode == CasStore::InsertMode::kMayBeMovedInPlace) { - if (MoveToFile(ChunkPath, Chunk)) + if (std::error_code MoveEc = MoveToFile(ChunkPath, Chunk); !MoveEc) { bool IsNew = UpdateIndex(ChunkHash, Chunk.Size()); return CasStore::InsertResult{.New = IsNew}; |