Merge pull request #1233 from LuigiBlood/64ddsave

[64DD] Avoid Disk save disappearing when crashing during save
This commit is contained in:
zilmar 2016-12-10 06:41:18 +11:00 committed by GitHub
commit 5d18a5ec5c
1 changed files with 1 additions and 1 deletions

View File

@ -76,7 +76,7 @@ bool CN64Disk::SaveDiskImage()
WriteTrace(TraceN64System, TraceDebug, "Trying to open %s (Shadow File)", ShadowFile.c_str());
m_DiskFile.Close();
if (!m_DiskFile.Open(ShadowFile.c_str(), CFileBase::modeWrite | CFileBase::modeCreate))
if (!m_DiskFile.Open(ShadowFile.c_str(), CFileBase::modeWrite | CFileBase::modeCreate | CFileBase::modeNoTruncate))
{
WriteTrace(TraceN64System, TraceError, "Failed to open %s (Shadow File)", ShadowFile.c_str());
return false;