diff --git a/Source/Core/Common/Src/LinearDiskCache.h b/Source/Core/Common/Src/LinearDiskCache.h index 56aa5f3923..e9e00239ae 100644 --- a/Source/Core/Common/Src/LinearDiskCache.h +++ b/Source/Core/Common/Src/LinearDiskCache.h @@ -75,7 +75,7 @@ public: Close(); // try opening for reading/writing - m_file.open(filename, ios_base::in | ios_base::out | ios_base::binary); + m_file.open(filename, ios_base::in | ios_base::out | ios_base::binary | ios_base::app); if (m_file.is_open() && ValidateHeader()) { @@ -99,6 +99,7 @@ public: ++num_entries; } + m_file.clear(); delete[] value; return num_entries;