From 72f36f8a82e9ed4a184b9029cb53780e62a9bea8 Mon Sep 17 00:00:00 2001 From: James Crook Date: Sun, 1 Sep 2019 15:28:00 +0100 Subject: [PATCH] Bug 1622 - Cryptic error message when existing project cannot be saved --- src/ProjectFileManager.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index d3809f299..ded22a58c 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -352,14 +352,15 @@ bool ProjectFileManager::DoSave (const bool fromSaveAs, safetyFileName = fileName + wxT(".bak"); #endif + bool bOK=true; if (wxFileExists(safetyFileName)) - wxRemoveFile(safetyFileName); + bOK = wxRemoveFile(safetyFileName); if ( !wxRenameFile(fileName, safetyFileName) ) { AudacityMessageBox( wxString::Format( - _("Could not create safety file: %s"), safetyFileName ), - _("Error"), wxICON_STOP, &window); + _("Audacity failed to write file %s.\nPerhaps disk is full or not writable."), safetyFileName ), + _("Error Writing to File"), wxICON_STOP, &window); return false; } }