1
0
mirror of https://github.com/cookiengineer/audacity synced 2026-04-05 22:07:42 +02:00

Bug2599: -wal and -shm of discarded temp projects should clean up

This commit is contained in:
Paul Licameli
2020-11-24 14:09:26 -05:00
parent 0d5b9753bc
commit 7e1e339f72
3 changed files with 25 additions and 32 deletions

View File

@@ -287,25 +287,7 @@ void AutoRecoveryDialog::OnDiscardSelected(wxCommandEvent &WXUNUSED(evt))
wxFileName temp(FileNames::TempDir(), wxT(""));
if (file == temp)
{
if (wxRemoveFile(fileName))
{
if (wxFileExists(fileName + wxT("-shm")))
{
wxRemoveFile(fileName + wxT("-shm"));
}
if (wxFileExists(fileName + wxT("-wal")))
{
wxRemoveFile(fileName + wxT("-wal"));
}
if (wxFileExists(fileName + wxT("-journal")))
{
wxRemoveFile(fileName + wxT("-journal"));
}
}
}
ProjectFileIO::RemoveProject(fileName);
}
else
// Don't remove from disk, but do (later) open the database