Use MIME type as backup to extension, just in case extension fails.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1470 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
05d2e470bf
commit
c889d03829
|
@ -585,10 +585,14 @@ void CISOProperties::OnEditConfig(wxCommandEvent& WXUNUSED (event))
|
||||||
SaveGameConfig();
|
SaveGameConfig();
|
||||||
|
|
||||||
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("ini"));
|
wxFileType* filetype = wxTheMimeTypesManager->GetFileTypeFromExtension(_("ini"));
|
||||||
if(filetype == NULL)
|
if(filetype == NULL) // From extension failed, trying with MIME type now
|
||||||
{
|
{
|
||||||
PanicAlert("Filetype 'ini' is unknown! Will not open!");
|
filetype = wxTheMimeTypesManager->GetFileTypeFromMimeType(_("text/plain"));
|
||||||
return;
|
if(filetype == NULL) // MIME type failed, aborting mission
|
||||||
|
{
|
||||||
|
PanicAlert("Filetype 'ini' is unknown! Will not open!");
|
||||||
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
wxString OpenCommand;
|
wxString OpenCommand;
|
||||||
OpenCommand = filetype->GetOpenCommand(wxString::FromAscii(GameIniFile.c_str()));
|
OpenCommand = filetype->GetOpenCommand(wxString::FromAscii(GameIniFile.c_str()));
|
||||||
|
|
Loading…
Reference in New Issue