1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-08-11 09:31:13 +02:00

Patch from Michael Chinen to fix unicode import crash due to c_str and wxLogMessage - especially on Mac. Also remove the forcing of file names to lower case for display, which can never have been correct, especially for case sensitive file systems.

This commit is contained in:
RichardAsh1981@gmail.com 2013-05-19 14:18:45 +00:00
parent e9353e32e0
commit 6664607e4d

View File

@ -376,8 +376,8 @@ int Importer::Import(wxString fName,
}
}
wxLogMessage(wxT("File name is %s"),fName.Lower().c_str());
wxLogMessage(wxT("Mime type is %s"),mime_type.Lower().c_str());
wxLogMessage(wxT("File name is %s"),(const char *) fName.mb_str());
wxLogMessage(wxT("Mime type is %s"),(const char *) mime_type.Lower().mb_str());
bool foundItem = false;
for (size_t i = 0; i < mExtImportItems->Count(); i++)
@ -387,7 +387,7 @@ int Importer::Import(wxString fName,
wxLogDebug(wxT("Testing extensions"));
for (size_t j = 0; j < item->extensions.Count(); j++)
{
wxLogDebug(wxT("%s"),item->extensions[j].Lower().c_str());
wxLogDebug(wxT("%s"), (const char *) item->extensions[j].Lower().mb_str());
if (wxMatchWild (item->extensions[j].Lower(),fName.Lower(), false))
{
wxLogDebug(wxT("Match!"));
@ -505,7 +505,7 @@ int Importer::Import(wxString fName,
inFile = plugin->Open(fName);
if ( (inFile != NULL) && (inFile->GetStreamCount() > 0) )
{
wxLogMessage(wxT("Open(%s) succeeded"), fName.Lower().c_str());
wxLogMessage(wxT("Open(%s) succeeded"),(const char *) fName.mb_str());
// File has more than one stream - display stream selector
if (inFile->GetStreamCount() > 1)
{