mirror of
https://github.com/cookiengineer/audacity
synced 2025-06-15 15:49:36 +02:00
Fixes #1305.
The check for macro directory now only happens if directory is selected and exists,
This commit is contained in:
parent
75e6f4b8bc
commit
f93e9fcf94
@ -418,6 +418,10 @@ bool DirectoriesPrefs::Validate()
|
||||
}
|
||||
else {
|
||||
/* If the directory already exists, make sure it is writable */
|
||||
if (!FileNames::WritableLocationCheck(mTempText->GetValue()))
|
||||
{
|
||||
return false;
|
||||
}
|
||||
wxLogNull logNo;
|
||||
Temp.AppendDir(wxT("canicreate"));
|
||||
path = Temp.GetPath();
|
||||
@ -443,6 +447,19 @@ bool DirectoriesPrefs::Validate()
|
||||
wxOK | wxCENTRE | wxICON_INFORMATION);
|
||||
}
|
||||
|
||||
const wxString macroPathString = mMacrosText->GetValue();
|
||||
|
||||
if (!macroPathString.empty())
|
||||
{
|
||||
const wxFileName macroPath { macroPathString };
|
||||
|
||||
if (macroPath.DirExists())
|
||||
{
|
||||
if (!FileNames::WritableLocationCheck(macroPathString))
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user