From 4cb9bb19fd7c174cca2b2720818eac1440f8809b Mon Sep 17 00:00:00 2001 From: Paul Licameli Date: Wed, 9 Dec 2020 18:00:41 -0500 Subject: [PATCH] Bug2603: Should give proper message for failed backup onto FAT drive... ... The error message eliminated here describes what should be ruled out by the loop before this line, which already checks that no previous file of the chosen name exists. So just give the generic write failure message. --- src/ProjectFileManager.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/ProjectFileManager.cpp b/src/ProjectFileManager.cpp index ef2f18a8f..54b4cd874 100644 --- a/src/ProjectFileManager.cpp +++ b/src/ProjectFileManager.cpp @@ -589,14 +589,11 @@ bool ProjectFileManager::SaveCopy(const FilePath &fileName /* = wxT("") */) break; } while (bPrompt); - if (!projectFileIO.SaveCopy(filename.GetFullPath())) + if (!projectFileIO.SaveCopy(fName)) { - // Overwrite disallowed. The destination project is open in another window. + auto msg = FileException::WriteFailureMessage(fName); AudacityMessageDialog m( - nullptr, - XO("The project will not be saved because the selected project is open in another window.\nPlease try again and select an original name."), - XO("Error Saving Project"), - wxOK | wxICON_ERROR); + nullptr, msg, XO("Error Saving Project"), wxOK | wxICON_ERROR); m.ShowModal();