1
0
mirror of https://github.com/cookiengineer/audacity synced 2025-11-23 17:30:17 +01:00

AUP3: Reduce crash exposure when compacting

There's still the possibility if a crash happens at just the
right time that the project will be named "<project>_compact_back"
so we should probably look for it during startup.

This also changes all "Vacuum" references to "compact".
This commit is contained in:
Leland Lucius
2020-07-28 23:25:50 -05:00
parent dad27f9eea
commit d4627f0daf
7 changed files with 101 additions and 139 deletions

View File

@@ -183,7 +183,7 @@ void OnCompact(const CommandContext &context)
currentTracks->Add(t->Duplicate());
}
projectFileIO.Vacuum(currentTracks, true);
projectFileIO.Compact(currentTracks, true);
auto after = wxFileName(projectFileIO.GetFileName()).GetSize() +
wxFileName(projectFileIO.GetFileName() + wxT("-wal")).GetSize();