diff options
| author | Dan Engelbrecht <[email protected]> | 2026-04-21 17:22:18 +0200 |
|---|---|---|
| committer | GitHub Enterprise <[email protected]> | 2026-04-21 17:22:18 +0200 |
| commit | 82e222bf23dee04e6fb825037fbb4d86a9571ce0 (patch) | |
| tree | 007b805500a5e23167ae8acc977efc3a6298d826 /src/zenstore | |
| parent | improved s3 hydration (#997) (diff) | |
| download | archived-zen-82e222bf23dee04e6fb825037fbb4d86a9571ce0.tar.xz archived-zen-82e222bf23dee04e6fb825037fbb4d86a9571ce0.zip | |
filesystem.h surface error codes (#998)
- Improvement: File copy, scan, clone, and move operations now report the underlying OS error in failure messages
Diffstat (limited to 'src/zenstore')
| -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}; |