Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
if a memcard is set to read only, fail more gracefully by reporting w…
…hen writes to the file fail instead of saying that the file does not exist.
  • Loading branch information
LPFaint99 committed Sep 20, 2013
1 parent 86d70ce commit 95aac4f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Source/Core/Core/Src/HW/GCMemcard.cpp
Expand Up @@ -52,7 +52,9 @@ GCMemcard::GCMemcard(const char *filename, bool forceCreation, bool sjis)
: m_valid(false)
, m_fileName(filename)
{
File::IOFile mcdFile(m_fileName, "r+b");
// Currently there is a string freeze. instead of adding a new message about needing r/w
// open file read only, if write is denied the error will be reported at that point
File::IOFile mcdFile(m_fileName, "rb");
if (!mcdFile.IsOpen())
{
if (!forceCreation && !AskYesNoT("\"%s\" does not exist.\n Create a new 16MB Memcard?", filename))
Expand Down

0 comments on commit 95aac4f

Please sign in to comment.