mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-16 16:10:06 +02:00
Handle absolute paths differently in external exporter
This commit is contained in:
parent
eeeb4f3e1f
commit
6302e89eb5
@ -758,6 +758,19 @@ bool ExportCL::CheckFileName(wxFileName &filename, int WXUNUSED(format))
|
|||||||
wxFileName cmd(argv[0]);
|
wxFileName cmd(argv[0]);
|
||||||
cmd.Normalize(wxPATH_NORM_ALL & ~wxPATH_NORM_ABSOLUTE);
|
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
|
// Search for the command in the PATH list
|
||||||
wxPathList pathlist;
|
wxPathList pathlist;
|
||||||
pathlist.AddEnvList(wxT("PATH"));
|
pathlist.AddEnvList(wxT("PATH"));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user