diff options
| author | Stefan Boberg <[email protected]> | 2021-11-01 18:35:05 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2021-11-01 18:35:05 +0100 |
| commit | d13fbfa5a9e582fac03766219b0ba1019525caae (patch) | |
| tree | 9ea2e3f78f83547c9a79864fede20d524dca18a6 /zenstore/caslog.cpp | |
| parent | Merge branch 'gc' of https://github.com/EpicGames/zen into gc (diff) | |
| download | zen-d13fbfa5a9e582fac03766219b0ba1019525caae.tar.xz zen-d13fbfa5a9e582fac03766219b0ba1019525caae.zip | |
caslog: Added GetLogSize, fixed issue with append offset computation
Diffstat (limited to 'zenstore/caslog.cpp')
| -rw-r--r-- | zenstore/caslog.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/zenstore/caslog.cpp b/zenstore/caslog.cpp index 38d0f818e..369bc55ad 100644 --- a/zenstore/caslog.cpp +++ b/zenstore/caslog.cpp @@ -102,6 +102,12 @@ CasLogFile::Close() m_File.Close(); } +uint64_t +CasLogFile::GetLogSize() +{ + return m_File.FileSize(); +} + void CasLogFile::Replay(std::function<void(const void*)>&& Handler) { @@ -132,7 +138,7 @@ CasLogFile::Replay(std::function<void(const void*)>&& Handler) Handler(ReadBuffer.data() + (i * m_RecordSize)); } - m_AppendOffset = LogBaseOffset + (LogFileSize * LogEntryCount); + m_AppendOffset = LogBaseOffset + (m_RecordSize * LogEntryCount); } void |