aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--zenserver/cache/structuredcachestore.cpp4
-rw-r--r--zenserver/cache/structuredcachestore.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/zenserver/cache/structuredcachestore.cpp b/zenserver/cache/structuredcachestore.cpp
index cf066fb0e..769167433 100644
--- a/zenserver/cache/structuredcachestore.cpp
+++ b/zenserver/cache/structuredcachestore.cpp
@@ -979,14 +979,14 @@ ZenCacheDiskLayer::CacheBucket::CollectGarbage(GcContext& GcCtx)
if (Loc.IsFlagSet(DiskLocation::kStandaloneFile))
{
- NewLoc = DiskLocation(0, Loc.Size(), 0, DiskLocation::kStandaloneFile);
+ NewLoc = DiskLocation(0, Loc.Size(), 0, Loc.GetFlags());
}
else
{
Chunk.resize(Loc.Size());
m_SobsFile.Read(Chunk.data(), Chunk.size(), Loc.Offset());
- NewLoc = DiskLocation(TmpCursor, Chunk.size(), 0, 0);
+ NewLoc = DiskLocation(TmpCursor, Chunk.size(), 0, Loc.GetFlags());
TmpSobs.Write(Chunk.data(), Chunk.size(), TmpCursor);
TmpCursor = RoundUp(TmpCursor + Chunk.size(), 16);
}
diff --git a/zenserver/cache/structuredcachestore.h b/zenserver/cache/structuredcachestore.h
index 9ffc06b28..f39d01747 100644
--- a/zenserver/cache/structuredcachestore.h
+++ b/zenserver/cache/structuredcachestore.h
@@ -96,6 +96,7 @@ struct DiskLocation
inline uint64_t Offset() const { return OffsetAndFlags & kOffsetMask; }
inline uint64_t Size() const { return LowerSize; }
inline uint64_t IsFlagSet(uint64_t Flag) const { return OffsetAndFlags & Flag; }
+ inline uint64_t GetFlags() const { return OffsetAndFlags & kFlagsMask; }
inline ZenContentType GetContentType() const
{
ZenContentType ContentType = ZenContentType::kBinary;