From 6302e89eb5268054c0ea4493db68a2f50eb50d52 Mon Sep 17 00:00:00 2001 From: Leland Lucius Date: Fri, 27 Mar 2020 07:08:16 -0500 Subject: [PATCH] Handle absolute paths differently in external exporter --- src/export/ExportCL.cpp | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/export/ExportCL.cpp b/src/export/ExportCL.cpp index e07fd9b08..d5a158fc8 100644 --- a/src/export/ExportCL.cpp +++ b/src/export/ExportCL.cpp @@ -758,6 +758,19 @@ bool ExportCL::CheckFileName(wxFileName &filename, int WXUNUSED(format)) wxFileName cmd(argv[0]); cmd.Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_ABSOLUTE); + // Just verify the given path exists if it is absolute. + if (cmd.IsAbsolute() && !cmd.Exists()) { + auto prompt = XO("\"%s\" couldn't be found.\n\nWould you like to continue anyway?") + .Format(cmd.GetFullPath()); + + int action = AudacityMessageBox( + prompt, + XO("Warning"), + wxYES_NO | wxICON_EXCLAMATION); + + return action == wxYES; + } + // Search for the command in the PATH list wxPathList pathlist; pathlist.AddEnvList(wxT("PATH"));