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

AUP3: Fix macro path handling

Aside from the breakage I added to it during the AUP3 conversion,
there was several other issues discovered in regards to how the
export paths were being handled.
This commit is contained in:
Leland Lucius
2020-08-10 17:48:59 -05:00
parent 5c719e8d65
commit 9d749fef14
9 changed files with 171 additions and 371 deletions

View File

@@ -466,6 +466,14 @@ bool Exporter::Process(bool selectedOnly, double t0, double t1)
// Get rid of mixerspec
mMixerSpec.reset();
if (success) {
if (mFormatName.empty()) {
gPrefs->Write(wxT("/Export/Format"), mPlugins[mFormat]->GetFormat(mSubFormat));
}
FileNames::UpdateDefaultPath(FileNames::Operation::Export, mFilename.GetPath());
}
return success;
}
@@ -774,11 +782,6 @@ bool Exporter::GetFilename()
//
bool Exporter::CheckFilename()
{
if( mFormatName.empty() )
gPrefs->Write(wxT("/Export/Format"), mPlugins[mFormat]->GetFormat(mSubFormat));
FileNames::UpdateDefaultPath(FileNames::Operation::Export, mFilename.GetPath());
//
// To be even safer, return a temporary file name based
// on this one...
@@ -924,6 +927,8 @@ bool Exporter::ExportTracks()
::wxRemoveFile(mActualName.GetFullPath());
::wxRenameFile(mFilename.GetFullPath(), mActualName.GetFullPath());
}
// Restore filname
mFilename = mActualName;
}
else {
if ( ! success )