From: <vo...@us...> - 2013-06-25 15:07:47
|
Revision: 4184 http://sourceforge.net/p/moneymanagerex/code/4184 Author: vomikan Date: 2013-06-25 15:07:44 +0000 (Tue, 25 Jun 2013) Log Message: ----------- fix for missing recent file Modified Paths: -------------- trunk/src/mmex.cpp Modified: trunk/src/mmex.cpp =================================================================== --- trunk/src/mmex.cpp 2013-06-25 14:47:15 UTC (rev 4183) +++ trunk/src/mmex.cpp 2013-06-25 15:07:44 UTC (rev 4184) @@ -3967,7 +3967,11 @@ void mmGUIFrame::OnRecentFiles(wxCommandEvent& event) { wxString file_name = recentFiles_->getRecentFile(event.GetId() - wxID_FILE1 +1); - SetDatabaseFile(file_name); + wxFileName file(file_name); + if (file.FileExists()) + SetDatabaseFile(file_name); + else //TODO: Clear wrong record + wxMessageBox(wxString::Format(_("File %s not found"), file_name), _("Error"), wxOK|wxICON_ERROR); } //---------------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |