aboutsummaryrefslogtreecommitdiff
path: root/zenserver/cache/structuredcachestore.cpp
diff options
context:
space:
mode:
authorDan Engelbrecht <[email protected]>2022-03-30 17:38:54 +0200
committerGitHub <[email protected]>2022-03-30 17:38:54 +0200
commite23f7951a8d5e9c8d7ea11b9eae2815aa9037604 (patch)
tree854c396aec3fce4d1bfdebee86ec50b754a9bb6a /zenserver/cache/structuredcachestore.cpp
parentMerge pull request #66 from EpicGames/de/gracefully-exit-gc (diff)
downloadzen-e23f7951a8d5e9c8d7ea11b9eae2815aa9037604.tar.xz
zen-e23f7951a8d5e9c8d7ea11b9eae2815aa9037604.zip
Retain flags for small objects in structured cache (#68)
Diffstat (limited to 'zenserver/cache/structuredcachestore.cpp')
-rw-r--r--zenserver/cache/structuredcachestore.cpp4
1 files changed, 2 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);
}