refactor: Add AutoFile::size

This commit is contained in:
Fabian Jahr committed 2025-11-14 01:17:38 +02:00
1 parent ec0f75862e
commit b7af960eb8
5 files changed
+24 -6

No files matched your search

+1 -2
View File
@@ -544,8 +544,7 @@ void BerkeleyRODatabase::Open()
page_size = outer_meta.pagesize;
// Verify the size of the file is a multiple of the page size
db_file.seek(0, SEEK_END);
int64_t size = db_file.tell();
const int64_t size{db_file.size()};
// Since BDB stores everything in a page, the file size should be a multiple of the page size;
// However, BDB doesn't actually check that this is the case, and enforcing this check results