aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore
diff options
context:
space:
mode:
authorZousar Shaker <[email protected]>2026-04-01 03:39:18 -0600
committerGitHub Enterprise <[email protected]>2026-04-01 11:39:18 +0200
commit99753a221753ba8d04b1f8b57454b8ba1f9a99ae (patch)
treee415a7b57f7e4fabbaeaf08a85c301ffde0fd64f /src/zenstore
parent5.8.1 (diff)
downloadzen-99753a221753ba8d04b1f8b57454b8ba1f9a99ae.tar.xz
zen-99753a221753ba8d04b1f8b57454b8ba1f9a99ae.zip
Zs/oplog export zero size attachment fix (#911)
* Unit test coverage for zero byte file handling in oplogs * Unit test fixes for the zero length file case * Fixes for zero length file attachments * Additional fix for zero length file attachments
Diffstat (limited to 'src/zenstore')
-rw-r--r--src/zenstore/projectstore.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/zenstore/projectstore.cpp b/src/zenstore/projectstore.cpp
index 0c4abeb1e..7cd6b9e37 100644
--- a/src/zenstore/projectstore.cpp
+++ b/src/zenstore/projectstore.cpp
@@ -5169,7 +5169,10 @@ ExtractRange(IoBuffer&& Chunk, uint64_t Offset, uint64_t Size, ZenContentType Ac
const bool IsFullRange = (Offset == 0) && ((Size == ~(0ull)) || (Size == ChunkSize));
if (IsFullRange)
{
- Result.Chunk = CompositeBuffer(SharedBuffer(std::move(Chunk)));
+ if (ChunkSize > 0)
+ {
+ Result.Chunk = CompositeBuffer(SharedBuffer(std::move(Chunk)));
+ }
Result.RawSize = 0;
}
else