From 8d73c9b1fedac310bd2333d08763944b5dca2dfd Mon Sep 17 00:00:00 2001 From: mchinen Date: Sun, 3 Apr 2011 16:43:24 +0000 Subject: [PATCH] Bug 328 (P2) followup : fix crash when exporting any file (caused by previous commits about this bug. --- src/export/Export.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/export/Export.cpp b/src/export/Export.cpp index 6664ae066..afed4ac77 100644 --- a/src/export/Export.cpp +++ b/src/export/Export.cpp @@ -646,14 +646,17 @@ bool Exporter::GetFilename() for (i = 0; i < gAudacityProjects.GetCount(); i++) { AliasedFileArray aliasedFiles; FindDependencies(gAudacityProjects[i], &aliasedFiles); - if (mFilename.GetFullPath() == aliasedFiles[i].mFileName.GetFullPath() && - !mFilename.FileExists()) { - // Warn and return to the dialog - wxMessageBox(_("You are attempting to overwrite an aliased file that is missing.\n\ + size_t j; + for (j = 0; j< aliasedFiles.GetCount(); j++) { + if (mFilename.GetFullPath() == aliasedFiles[j].mFileName.GetFullPath() && + !mFilename.FileExists()) { + // Warn and return to the dialog + wxMessageBox(_("You are attempting to overwrite an aliased file that is missing.\n\ The file cannot be written because the path is needed to restore the original audio to the project.\n\ You can see the missing files in File > Check Dependencies.\n\ If you still wish to export, please choose a different filename.")); - overwritingMissingAlias = true; + overwritingMissingAlias = true; + } } } if (overwritingMissingAlias)