1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-10-10 16:43:33 +02:00

Fix for bug #387

As this is a reversal of change committed in 2007 with no real
explanation or history behind that change other than it was
done for Export, we should probably give exporting a bit of a
workout.
This commit is contained in:
Leland Lucius
2015-05-03 23:36:30 -05:00
parent 01f28f645d
commit 4d0de66523
3 changed files with 18 additions and 21 deletions

View File

@@ -845,12 +845,8 @@ int FileDialog::ShowModal()
//=== Adding the correct extension >>=================================
m_filterIndex = (int)of.nFilterIndex - 1;
#if 0
// LLL: Removed to prevent adding extension during Export
// processing.
if ( !of.nFileExtension ||
(of.nFileExtension && fileNameBuffer[of.nFileExtension] == wxT('\0')) )
(of.nFileExtension && fileNameBuffer[of.nFileExtension] == wxT('\0')) )
{
// User has typed a filename without an extension:
const wxChar* extension = filterBuffer;
@@ -863,7 +859,7 @@ int FileDialog::ShowModal()
wxStrncpy(fileNameBuffer, m_fileName.c_str(), wxMin(m_fileName.Len(), wxMAXPATH-1));
fileNameBuffer[wxMin(m_fileName.Len(), wxMAXPATH-1)] = wxT('\0');
}
#endif
m_path = fileNameBuffer;
m_fileName = wxFileNameFromPath(fileNameBuffer);
m_fileNames.Add(m_fileName);