Fix issue with LinearDiskCache where only new files could be written to, Append() would fail on previously existing cache files.

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6690 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Jordan Woyak 2010-12-30 07:32:16 +00:00
parent 613b0f4c51
commit 2c4f9825ca

View File

@ -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;