[64DD] Avoid Disk save disappearing when crashing during save

This commit is contained in:
luigiblood 2016-12-06 23:05:29 +01:00
parent 8d60103da2
commit 8403be1da9
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;