1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-05-02 08:39:46 +02:00

When export fails, don't leave a partially written file.

This commit is contained in:
Paul Licameli 2017-10-17 06:29:04 -04:00
parent 9694279804
commit cbf4c11e26

View File

@ -842,6 +842,11 @@ bool Exporter::ExportTracks()
::wxRenameFile(mFilename.GetFullPath(), mActualName.GetFullPath());
}
}
else {
if ( ! success )
// Remove any new, and only partially written, file.
::wxRemoveFile(mFilename.GetFullPath());
}
} );
auto result = mPlugins[mFormat]->Export(mProject,