1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-02-09 13:12:17 +01:00

Flush .aup before writing .au; no redundant out-of-space messages

This commit is contained in:
Paul Licameli
2017-10-24 14:46:32 -04:00
parent 7eeb88384d
commit 58f07d2021
3 changed files with 41 additions and 8 deletions

View File

@@ -313,14 +313,25 @@ XMLFileWriter::~XMLFileWriter()
void XMLFileWriter::Commit()
// may throw
{
PreCommit();
PostCommit();
}
void XMLFileWriter::PreCommit()
// may throw
{
while (mTagstack.GetCount()) {
EndTag(mTagstack[0]);
}
auto tempPath = GetName();
CloseWithoutEndingTags();
}
void XMLFileWriter::PostCommit()
// may throw
{
auto tempPath = GetName();
if (mKeepBackup) {
if (! mBackupFile.Close() ||
! wxRenameFile( mOutputPath, mBackupName ) )