aboutsummaryrefslogtreecommitdiff
path: root/src/zenstore/projectstore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/zenstore/projectstore.cpp')
-rw-r--r--src/zenstore/projectstore.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/zenstore/projectstore.cpp b/src/zenstore/projectstore.cpp
index 13674da4d..7cd6b9e37 100644
--- a/src/zenstore/projectstore.cpp
+++ b/src/zenstore/projectstore.cpp
@@ -3180,6 +3180,7 @@ ProjectStore::Oplog::AddFileMapping(const RwLock::ExclusiveLockScope&,
}
else
{
+ m_ChunkMap.erase(FileId);
Entry.ServerPath = ServerPath;
}
@@ -5168,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