Skip to content

Commit

Permalink
Added check that preferences file is not read-only
Browse files Browse the repository at this point in the history
  • Loading branch information
nickgammon committed Apr 20, 2014
1 parent de7c9d6 commit da7e6b1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions MUSHclient.cpp
Expand Up @@ -313,6 +313,16 @@ BOOL CMUSHclientApp::InitInstance()
}


if (sqlite3_db_readonly (db, "main"))
{
::AfxMessageBox ((LPCTSTR) CFormat ("The global preferences database at: <%s> is read-only."
"\r\nPlease ensure that you have write-access to that file.",
m_PreferencesDatabaseName.c_str ()
));
sqlite3_close(db);
return FALSE;
}

#define CURRENT_DB_VERSION 1

string db_version;
Expand Down

0 comments on commit da7e6b1

Please sign in to comment.